Skip to content
Snippets Groups Projects
Select Git revision
  • 461a58e6a4e0622b852efd209c7e137946b5dd92
  • release default protected
  • XX-4719/announcementChannels
  • jonah/channelCodenames
  • master protected
  • XX-4601/HavenInvites
  • sihSize
  • project/HavenNotifications
  • hotfix/base8KeySizes
  • Anne/Project/DM
  • XX-4004_ownership_vector_test
  • XX-3566_constant_time_comparison
  • XX-4132-upgrade-channel-keying
  • XX-4133-rsa-to-private
  • XX-3958/ConnectionCLI
  • xx-3893/asymmetric
  • xx-3891/symmetric-integration
  • hotfix/groupChat
  • XX-3770/UpdateExternalDeps
  • dev
  • waitingRoundsRewrite
  • v0.0.9
  • v0.0.8
  • v0.0.7
  • v0.0.6
  • v0.0.5
  • v0.0.4
  • v0.0.3
  • v0.0.2
  • v0.0.1
30 results

stream_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")
    	}
    
    }