We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 669731f commit b04f734Copy full SHA for b04f734
envs/envs_test.go
@@ -70,6 +70,27 @@ func (f fakeEnv) Local() bool {
70
return true
71
}
72
73
+func (s *ScenvSuite) TestGenericContainerExposesHostAndPort(c *C) {
74
+ env := fakeEnv{
75
+ Rels: map[string][]map[string]interface{}{
76
+ "container": {
77
+ map[string]interface{}{
78
+ "host": "localhost",
79
+ "ip": "127.0.0.1",
80
+ "port": 9200,
81
+ "rel": "simple",
82
+ "scheme": "undefined",
83
+ },
84
85
86
+ }
87
+
88
+ rels := extractRelationshipsEnvs(env)
89
+ c.Assert(rels["CONTAINER_HOST"], Equals, "localhost")
90
+ c.Assert(rels["CONTAINER_PORT"], Equals, "9200")
91
+ c.Assert(rels["CONTAINER_IP"], Equals, "127.0.0.1")
92
+}
93
94
func (s *ScenvSuite) TestElasticsearchURLEndsWithTrailingSlash(c *C) {
95
env := fakeEnv{
96
Rels: map[string][]map[string]interface{}{
0 commit comments