Skip to content
Snippets Groups Projects
Select Git revision
  • f65139ba52e31928eda58ff191dd724262f3afae
  • release default
  • master protected
  • XX-4441
  • Jakub/rootless-CI
  • Anne/CI-Test
  • waitingRoundsRewrite
  • quantumSecure
  • fullRateLimit
  • XX-3564/TlsCipherSuite
  • hotfix/groupNotification
  • Josh/RateLimiting
  • debug/sourceOfErrors
  • XX-3540/TestCert
  • f76/error
  • notls
  • url-repo-rename
  • feature/dynamicAuthRemoval
  • jono/yaml
  • version-2_5_3
  • hotfix/signing
  • v3.13.0
  • v3.11.0
  • v3.10.0
  • v3.9.0
  • v3.7.0
  • v3.6.0
  • v3.5.0
  • v3.1.0
  • v2.2.8
  • v2.2.7
  • v2.1.0
  • v2.0.0
  • v1.7.0
  • v1.6.0
  • v1.5.0
  • v1.4.2
  • v1.4.1
  • v1.4.0
  • v1.3.2
  • v1.3.1
41 results

metrics_test.go

Blame
  • metrics_test.go 1.01 KiB
    ////////////////////////////////////////////////////////////////////////////////
    // Copyright © 2019 Privategrity Corporation                                   /
    //                                                                             /
    // All rights reserved.                                                        /
    ////////////////////////////////////////////////////////////////////////////////
    
    package conf
    
    import (
    	"gitlab.com/elixxir/primitives/utils"
    	"gopkg.in/yaml.v2"
    	"reflect"
    	"testing"
    )
    
    var ExpectedMetrics = Metrics{
    	Log: "~/.elixxir/metrics.log",
    }
    
    // This test checks that unmarshalling the params.yaml file
    // has the expected Database object.
    func TestMetrics_UnmarshallingFileEqualsExpected(t *testing.T) {
    
    	buf, _ := utils.ReadFile("./params.yaml")
    
    	actual := Params{}
    
    	err := yaml.Unmarshal(buf, &actual)
    	if err != nil {
    		t.Errorf("Unable to decode into struct, %v", err)
    	}
    
    	if !reflect.DeepEqual(ExpectedMetrics, actual.Metrics) {
    		t.Errorf("Metrics object did not match value")
    	}
    
    }