(t *testing.T)
| 115 | } |
| 116 | |
| 117 | func TestUserAgent(t *testing.T) { |
| 118 | clusters := make(map[string]*api.Cluster) |
| 119 | clusters["fake-cluster"] = &api.Cluster{ |
| 120 | Server: "fake-server", |
| 121 | } |
| 122 | |
| 123 | contexts := make(map[string]*api.Context) |
| 124 | contexts["fake-context"] = &api.Context{ |
| 125 | Cluster: "fake-cluster", |
| 126 | } |
| 127 | |
| 128 | loader := &configTesting.Loader{ |
| 129 | RawConfig: &api.Config{ |
| 130 | Clusters: clusters, |
| 131 | Contexts: contexts, |
| 132 | }, |
| 133 | } |
| 134 | client, err := NewClientFromContext("fake-context", "", false, loader) |
| 135 | if err != nil { |
| 136 | t.Fatal(err) |
| 137 | } |
| 138 | assert.Equal(t, client.RestConfig().UserAgent, "DevSpace Version "+upgrade.GetVersion()) |
| 139 | } |
| 140 | |
| 141 | type testCaseContext struct { |
| 142 | selectContext string |
nothing calls this directly
no test coverage detected