feat(instrumentation): work on settings model for internal metrics publishing, #4696

This commit is contained in:
Torkel Ödegaard
2016-06-02 14:32:17 +02:00
parent 74101eaf7c
commit 6b2a4fe8e8
10 changed files with 163 additions and 70 deletions
+9
View File
@@ -89,5 +89,14 @@ func TestLoadingSettings(t *testing.T) {
So(DataPath, ShouldEqual, "/tmp/env_override")
})
Convey("instance_name default to hostname even if hostname env is emtpy", func() {
NewConfigContext(&CommandLineArgs{
HomePath: "../../",
})
hostname, _ := os.Hostname()
So(InstanceName, ShouldEqual, hostname)
})
})
}