// TestRefreshVersion get the latest version being used from api func TestRefreshVersion(t *testing.T) { var ( d *OVTest c *ov.OVClient ) if os.Getenv("ONEVIEW_TEST_ACCEPTANCE") == "true" { d, c = getTestDriverA("dev") if c == nil { t.Fatalf("Failed to execute getTestDriver() ") } c.APIVersion = -1 assert.Equal(t, -1, c.APIVersion) err := c.RefreshVersion() assert.NoError(t, err, "RefreshVersion threw error -> %s", err) assert.True(t, d.Tc.EqualFaceI(d.Tc.GetExpectsData(d.Env, "CurrentVersion"), c.APIVersion)) } else { _, c = getTestDriverU("dev") err := c.RefreshVersion() assert.Error(t, err, fmt.Sprintf("ALL ok, no error, caught as expected: %s", err)) } }