diff --git a/Makefile b/Makefile index 64ebb79dbbe..6b2b05560b8 100644 --- a/Makefile +++ b/Makefile @@ -202,7 +202,7 @@ units-non-plugin: @rm -f $(wildcard fixtures/plugins/*.exe) @ginkgo version CF_HOME=$(PWD)/fixtures CF_USERNAME="" CF_PASSWORD="" $(ginkgo_units) \ - -skipPackage integration,cf/ssh,plugin,cf/actors/plugin,cf/commands/plugin,cf/actors/plugin + -skipPackage integration,cf/ssh,plugin,cf/actors/plugin,cf/commands/plugin,cf/actors/plugin,util/randomword CF_HOME=$(PWD)/fixtures $(ginkgo_units) -flakeAttempts 3 cf/ssh units-full: build units-plugin units-non-plugin diff --git a/command/commandfakes/fake_config.go b/command/commandfakes/fake_config.go index bedef0b8890..4a4c307d06e 100644 --- a/command/commandfakes/fake_config.go +++ b/command/commandfakes/fake_config.go @@ -621,15 +621,16 @@ func (fake *FakeConfig) APIVersion() string { ret, specificReturn := fake.aPIVersionReturnsOnCall[len(fake.aPIVersionArgsForCall)] fake.aPIVersionArgsForCall = append(fake.aPIVersionArgsForCall, struct { }{}) + stub := fake.APIVersionStub + fakeReturns := fake.aPIVersionReturns fake.recordInvocation("APIVersion", []interface{}{}) fake.aPIVersionMutex.Unlock() - if fake.APIVersionStub != nil { - return fake.APIVersionStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.aPIVersionReturns return fakeReturns.result1 } @@ -673,15 +674,16 @@ func (fake *FakeConfig) AccessToken() string { ret, specificReturn := fake.accessTokenReturnsOnCall[len(fake.accessTokenArgsForCall)] fake.accessTokenArgsForCall = append(fake.accessTokenArgsForCall, struct { }{}) + stub := fake.AccessTokenStub + fakeReturns := fake.accessTokenReturns fake.recordInvocation("AccessToken", []interface{}{}) fake.accessTokenMutex.Unlock() - if fake.AccessTokenStub != nil { - return fake.AccessTokenStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.accessTokenReturns return fakeReturns.result1 } @@ -725,9 +727,10 @@ func (fake *FakeConfig) AddPlugin(arg1 configv3.Plugin) { fake.addPluginArgsForCall = append(fake.addPluginArgsForCall, struct { arg1 configv3.Plugin }{arg1}) + stub := fake.AddPluginStub fake.recordInvocation("AddPlugin", []interface{}{arg1}) fake.addPluginMutex.Unlock() - if fake.AddPluginStub != nil { + if stub != nil { fake.AddPluginStub(arg1) } } @@ -757,9 +760,10 @@ func (fake *FakeConfig) AddPluginRepository(arg1 string, arg2 string) { arg1 string arg2 string }{arg1, arg2}) + stub := fake.AddPluginRepositoryStub fake.recordInvocation("AddPluginRepository", []interface{}{arg1, arg2}) fake.addPluginRepositoryMutex.Unlock() - if fake.AddPluginRepositoryStub != nil { + if stub != nil { fake.AddPluginRepositoryStub(arg1, arg2) } } @@ -788,15 +792,16 @@ func (fake *FakeConfig) AuthorizationEndpoint() string { ret, specificReturn := fake.authorizationEndpointReturnsOnCall[len(fake.authorizationEndpointArgsForCall)] fake.authorizationEndpointArgsForCall = append(fake.authorizationEndpointArgsForCall, struct { }{}) + stub := fake.AuthorizationEndpointStub + fakeReturns := fake.authorizationEndpointReturns fake.recordInvocation("AuthorizationEndpoint", []interface{}{}) fake.authorizationEndpointMutex.Unlock() - if fake.AuthorizationEndpointStub != nil { - return fake.AuthorizationEndpointStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.authorizationEndpointReturns return fakeReturns.result1 } @@ -840,15 +845,16 @@ func (fake *FakeConfig) BinaryName() string { ret, specificReturn := fake.binaryNameReturnsOnCall[len(fake.binaryNameArgsForCall)] fake.binaryNameArgsForCall = append(fake.binaryNameArgsForCall, struct { }{}) + stub := fake.BinaryNameStub + fakeReturns := fake.binaryNameReturns fake.recordInvocation("BinaryName", []interface{}{}) fake.binaryNameMutex.Unlock() - if fake.BinaryNameStub != nil { - return fake.BinaryNameStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.binaryNameReturns return fakeReturns.result1 } @@ -892,15 +898,16 @@ func (fake *FakeConfig) BinaryVersion() string { ret, specificReturn := fake.binaryVersionReturnsOnCall[len(fake.binaryVersionArgsForCall)] fake.binaryVersionArgsForCall = append(fake.binaryVersionArgsForCall, struct { }{}) + stub := fake.BinaryVersionStub + fakeReturns := fake.binaryVersionReturns fake.recordInvocation("BinaryVersion", []interface{}{}) fake.binaryVersionMutex.Unlock() - if fake.BinaryVersionStub != nil { - return fake.BinaryVersionStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.binaryVersionReturns return fakeReturns.result1 } @@ -944,15 +951,16 @@ func (fake *FakeConfig) CFPassword() string { ret, specificReturn := fake.cFPasswordReturnsOnCall[len(fake.cFPasswordArgsForCall)] fake.cFPasswordArgsForCall = append(fake.cFPasswordArgsForCall, struct { }{}) + stub := fake.CFPasswordStub + fakeReturns := fake.cFPasswordReturns fake.recordInvocation("CFPassword", []interface{}{}) fake.cFPasswordMutex.Unlock() - if fake.CFPasswordStub != nil { - return fake.CFPasswordStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.cFPasswordReturns return fakeReturns.result1 } @@ -996,15 +1004,16 @@ func (fake *FakeConfig) CFUsername() string { ret, specificReturn := fake.cFUsernameReturnsOnCall[len(fake.cFUsernameArgsForCall)] fake.cFUsernameArgsForCall = append(fake.cFUsernameArgsForCall, struct { }{}) + stub := fake.CFUsernameStub + fakeReturns := fake.cFUsernameReturns fake.recordInvocation("CFUsername", []interface{}{}) fake.cFUsernameMutex.Unlock() - if fake.CFUsernameStub != nil { - return fake.CFUsernameStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.cFUsernameReturns return fakeReturns.result1 } @@ -1048,15 +1057,16 @@ func (fake *FakeConfig) ColorEnabled() configv3.ColorSetting { ret, specificReturn := fake.colorEnabledReturnsOnCall[len(fake.colorEnabledArgsForCall)] fake.colorEnabledArgsForCall = append(fake.colorEnabledArgsForCall, struct { }{}) + stub := fake.ColorEnabledStub + fakeReturns := fake.colorEnabledReturns fake.recordInvocation("ColorEnabled", []interface{}{}) fake.colorEnabledMutex.Unlock() - if fake.ColorEnabledStub != nil { - return fake.ColorEnabledStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.colorEnabledReturns return fakeReturns.result1 } @@ -1100,15 +1110,16 @@ func (fake *FakeConfig) CurrentUser() (configv3.User, error) { ret, specificReturn := fake.currentUserReturnsOnCall[len(fake.currentUserArgsForCall)] fake.currentUserArgsForCall = append(fake.currentUserArgsForCall, struct { }{}) + stub := fake.CurrentUserStub + fakeReturns := fake.currentUserReturns fake.recordInvocation("CurrentUser", []interface{}{}) fake.currentUserMutex.Unlock() - if fake.CurrentUserStub != nil { - return fake.CurrentUserStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1, ret.result2 } - fakeReturns := fake.currentUserReturns return fakeReturns.result1, fakeReturns.result2 } @@ -1155,15 +1166,16 @@ func (fake *FakeConfig) CurrentUserName() (string, error) { ret, specificReturn := fake.currentUserNameReturnsOnCall[len(fake.currentUserNameArgsForCall)] fake.currentUserNameArgsForCall = append(fake.currentUserNameArgsForCall, struct { }{}) + stub := fake.CurrentUserNameStub + fakeReturns := fake.currentUserNameReturns fake.recordInvocation("CurrentUserName", []interface{}{}) fake.currentUserNameMutex.Unlock() - if fake.CurrentUserNameStub != nil { - return fake.CurrentUserNameStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1, ret.result2 } - fakeReturns := fake.currentUserNameReturns return fakeReturns.result1, fakeReturns.result2 } @@ -1210,15 +1222,16 @@ func (fake *FakeConfig) DialTimeout() time.Duration { ret, specificReturn := fake.dialTimeoutReturnsOnCall[len(fake.dialTimeoutArgsForCall)] fake.dialTimeoutArgsForCall = append(fake.dialTimeoutArgsForCall, struct { }{}) + stub := fake.DialTimeoutStub + fakeReturns := fake.dialTimeoutReturns fake.recordInvocation("DialTimeout", []interface{}{}) fake.dialTimeoutMutex.Unlock() - if fake.DialTimeoutStub != nil { - return fake.DialTimeoutStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.dialTimeoutReturns return fakeReturns.result1 } @@ -1262,15 +1275,16 @@ func (fake *FakeConfig) DockerPassword() string { ret, specificReturn := fake.dockerPasswordReturnsOnCall[len(fake.dockerPasswordArgsForCall)] fake.dockerPasswordArgsForCall = append(fake.dockerPasswordArgsForCall, struct { }{}) + stub := fake.DockerPasswordStub + fakeReturns := fake.dockerPasswordReturns fake.recordInvocation("DockerPassword", []interface{}{}) fake.dockerPasswordMutex.Unlock() - if fake.DockerPasswordStub != nil { - return fake.DockerPasswordStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.dockerPasswordReturns return fakeReturns.result1 } @@ -1314,15 +1328,16 @@ func (fake *FakeConfig) Experimental() bool { ret, specificReturn := fake.experimentalReturnsOnCall[len(fake.experimentalArgsForCall)] fake.experimentalArgsForCall = append(fake.experimentalArgsForCall, struct { }{}) + stub := fake.ExperimentalStub + fakeReturns := fake.experimentalReturns fake.recordInvocation("Experimental", []interface{}{}) fake.experimentalMutex.Unlock() - if fake.ExperimentalStub != nil { - return fake.ExperimentalStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.experimentalReturns return fakeReturns.result1 } @@ -1367,15 +1382,16 @@ func (fake *FakeConfig) GetPlugin(arg1 string) (configv3.Plugin, bool) { fake.getPluginArgsForCall = append(fake.getPluginArgsForCall, struct { arg1 string }{arg1}) + stub := fake.GetPluginStub + fakeReturns := fake.getPluginReturns fake.recordInvocation("GetPlugin", []interface{}{arg1}) fake.getPluginMutex.Unlock() - if fake.GetPluginStub != nil { - return fake.GetPluginStub(arg1) + if stub != nil { + return stub(arg1) } if specificReturn { return ret.result1, ret.result2 } - fakeReturns := fake.getPluginReturns return fakeReturns.result1, fakeReturns.result2 } @@ -1430,15 +1446,16 @@ func (fake *FakeConfig) GetPluginCaseInsensitive(arg1 string) (configv3.Plugin, fake.getPluginCaseInsensitiveArgsForCall = append(fake.getPluginCaseInsensitiveArgsForCall, struct { arg1 string }{arg1}) + stub := fake.GetPluginCaseInsensitiveStub + fakeReturns := fake.getPluginCaseInsensitiveReturns fake.recordInvocation("GetPluginCaseInsensitive", []interface{}{arg1}) fake.getPluginCaseInsensitiveMutex.Unlock() - if fake.GetPluginCaseInsensitiveStub != nil { - return fake.GetPluginCaseInsensitiveStub(arg1) + if stub != nil { + return stub(arg1) } if specificReturn { return ret.result1, ret.result2 } - fakeReturns := fake.getPluginCaseInsensitiveReturns return fakeReturns.result1, fakeReturns.result2 } @@ -1492,15 +1509,16 @@ func (fake *FakeConfig) HasTargetedOrganization() bool { ret, specificReturn := fake.hasTargetedOrganizationReturnsOnCall[len(fake.hasTargetedOrganizationArgsForCall)] fake.hasTargetedOrganizationArgsForCall = append(fake.hasTargetedOrganizationArgsForCall, struct { }{}) + stub := fake.HasTargetedOrganizationStub + fakeReturns := fake.hasTargetedOrganizationReturns fake.recordInvocation("HasTargetedOrganization", []interface{}{}) fake.hasTargetedOrganizationMutex.Unlock() - if fake.HasTargetedOrganizationStub != nil { - return fake.HasTargetedOrganizationStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.hasTargetedOrganizationReturns return fakeReturns.result1 } @@ -1544,15 +1562,16 @@ func (fake *FakeConfig) HasTargetedSpace() bool { ret, specificReturn := fake.hasTargetedSpaceReturnsOnCall[len(fake.hasTargetedSpaceArgsForCall)] fake.hasTargetedSpaceArgsForCall = append(fake.hasTargetedSpaceArgsForCall, struct { }{}) + stub := fake.HasTargetedSpaceStub + fakeReturns := fake.hasTargetedSpaceReturns fake.recordInvocation("HasTargetedSpace", []interface{}{}) fake.hasTargetedSpaceMutex.Unlock() - if fake.HasTargetedSpaceStub != nil { - return fake.HasTargetedSpaceStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.hasTargetedSpaceReturns return fakeReturns.result1 } @@ -1596,15 +1615,16 @@ func (fake *FakeConfig) IsTTY() bool { ret, specificReturn := fake.isTTYReturnsOnCall[len(fake.isTTYArgsForCall)] fake.isTTYArgsForCall = append(fake.isTTYArgsForCall, struct { }{}) + stub := fake.IsTTYStub + fakeReturns := fake.isTTYReturns fake.recordInvocation("IsTTY", []interface{}{}) fake.isTTYMutex.Unlock() - if fake.IsTTYStub != nil { - return fake.IsTTYStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.isTTYReturns return fakeReturns.result1 } @@ -1648,15 +1668,16 @@ func (fake *FakeConfig) Locale() string { ret, specificReturn := fake.localeReturnsOnCall[len(fake.localeArgsForCall)] fake.localeArgsForCall = append(fake.localeArgsForCall, struct { }{}) + stub := fake.LocaleStub + fakeReturns := fake.localeReturns fake.recordInvocation("Locale", []interface{}{}) fake.localeMutex.Unlock() - if fake.LocaleStub != nil { - return fake.LocaleStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.localeReturns return fakeReturns.result1 } @@ -1700,15 +1721,16 @@ func (fake *FakeConfig) LogCacheEndpoint() string { ret, specificReturn := fake.logCacheEndpointReturnsOnCall[len(fake.logCacheEndpointArgsForCall)] fake.logCacheEndpointArgsForCall = append(fake.logCacheEndpointArgsForCall, struct { }{}) + stub := fake.LogCacheEndpointStub + fakeReturns := fake.logCacheEndpointReturns fake.recordInvocation("LogCacheEndpoint", []interface{}{}) fake.logCacheEndpointMutex.Unlock() - if fake.LogCacheEndpointStub != nil { - return fake.LogCacheEndpointStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.logCacheEndpointReturns return fakeReturns.result1 } @@ -1752,15 +1774,16 @@ func (fake *FakeConfig) MinCLIVersion() string { ret, specificReturn := fake.minCLIVersionReturnsOnCall[len(fake.minCLIVersionArgsForCall)] fake.minCLIVersionArgsForCall = append(fake.minCLIVersionArgsForCall, struct { }{}) + stub := fake.MinCLIVersionStub + fakeReturns := fake.minCLIVersionReturns fake.recordInvocation("MinCLIVersion", []interface{}{}) fake.minCLIVersionMutex.Unlock() - if fake.MinCLIVersionStub != nil { - return fake.MinCLIVersionStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.minCLIVersionReturns return fakeReturns.result1 } @@ -1804,15 +1827,16 @@ func (fake *FakeConfig) NOAARequestRetryCount() int { ret, specificReturn := fake.nOAARequestRetryCountReturnsOnCall[len(fake.nOAARequestRetryCountArgsForCall)] fake.nOAARequestRetryCountArgsForCall = append(fake.nOAARequestRetryCountArgsForCall, struct { }{}) + stub := fake.NOAARequestRetryCountStub + fakeReturns := fake.nOAARequestRetryCountReturns fake.recordInvocation("NOAARequestRetryCount", []interface{}{}) fake.nOAARequestRetryCountMutex.Unlock() - if fake.NOAARequestRetryCountStub != nil { - return fake.NOAARequestRetryCountStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.nOAARequestRetryCountReturns return fakeReturns.result1 } @@ -1856,15 +1880,16 @@ func (fake *FakeConfig) NetworkPolicyV1Endpoint() string { ret, specificReturn := fake.networkPolicyV1EndpointReturnsOnCall[len(fake.networkPolicyV1EndpointArgsForCall)] fake.networkPolicyV1EndpointArgsForCall = append(fake.networkPolicyV1EndpointArgsForCall, struct { }{}) + stub := fake.NetworkPolicyV1EndpointStub + fakeReturns := fake.networkPolicyV1EndpointReturns fake.recordInvocation("NetworkPolicyV1Endpoint", []interface{}{}) fake.networkPolicyV1EndpointMutex.Unlock() - if fake.NetworkPolicyV1EndpointStub != nil { - return fake.NetworkPolicyV1EndpointStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.networkPolicyV1EndpointReturns return fakeReturns.result1 } @@ -1908,15 +1933,16 @@ func (fake *FakeConfig) OverallPollingTimeout() time.Duration { ret, specificReturn := fake.overallPollingTimeoutReturnsOnCall[len(fake.overallPollingTimeoutArgsForCall)] fake.overallPollingTimeoutArgsForCall = append(fake.overallPollingTimeoutArgsForCall, struct { }{}) + stub := fake.OverallPollingTimeoutStub + fakeReturns := fake.overallPollingTimeoutReturns fake.recordInvocation("OverallPollingTimeout", []interface{}{}) fake.overallPollingTimeoutMutex.Unlock() - if fake.OverallPollingTimeoutStub != nil { - return fake.OverallPollingTimeoutStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.overallPollingTimeoutReturns return fakeReturns.result1 } @@ -1960,15 +1986,16 @@ func (fake *FakeConfig) PluginHome() string { ret, specificReturn := fake.pluginHomeReturnsOnCall[len(fake.pluginHomeArgsForCall)] fake.pluginHomeArgsForCall = append(fake.pluginHomeArgsForCall, struct { }{}) + stub := fake.PluginHomeStub + fakeReturns := fake.pluginHomeReturns fake.recordInvocation("PluginHome", []interface{}{}) fake.pluginHomeMutex.Unlock() - if fake.PluginHomeStub != nil { - return fake.PluginHomeStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.pluginHomeReturns return fakeReturns.result1 } @@ -2012,15 +2039,16 @@ func (fake *FakeConfig) PluginRepositories() []configv3.PluginRepository { ret, specificReturn := fake.pluginRepositoriesReturnsOnCall[len(fake.pluginRepositoriesArgsForCall)] fake.pluginRepositoriesArgsForCall = append(fake.pluginRepositoriesArgsForCall, struct { }{}) + stub := fake.PluginRepositoriesStub + fakeReturns := fake.pluginRepositoriesReturns fake.recordInvocation("PluginRepositories", []interface{}{}) fake.pluginRepositoriesMutex.Unlock() - if fake.PluginRepositoriesStub != nil { - return fake.PluginRepositoriesStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.pluginRepositoriesReturns return fakeReturns.result1 } @@ -2064,15 +2092,16 @@ func (fake *FakeConfig) Plugins() []configv3.Plugin { ret, specificReturn := fake.pluginsReturnsOnCall[len(fake.pluginsArgsForCall)] fake.pluginsArgsForCall = append(fake.pluginsArgsForCall, struct { }{}) + stub := fake.PluginsStub + fakeReturns := fake.pluginsReturns fake.recordInvocation("Plugins", []interface{}{}) fake.pluginsMutex.Unlock() - if fake.PluginsStub != nil { - return fake.PluginsStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.pluginsReturns return fakeReturns.result1 } @@ -2116,15 +2145,16 @@ func (fake *FakeConfig) PollingInterval() time.Duration { ret, specificReturn := fake.pollingIntervalReturnsOnCall[len(fake.pollingIntervalArgsForCall)] fake.pollingIntervalArgsForCall = append(fake.pollingIntervalArgsForCall, struct { }{}) + stub := fake.PollingIntervalStub + fakeReturns := fake.pollingIntervalReturns fake.recordInvocation("PollingInterval", []interface{}{}) fake.pollingIntervalMutex.Unlock() - if fake.PollingIntervalStub != nil { - return fake.PollingIntervalStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.pollingIntervalReturns return fakeReturns.result1 } @@ -2168,15 +2198,16 @@ func (fake *FakeConfig) RefreshToken() string { ret, specificReturn := fake.refreshTokenReturnsOnCall[len(fake.refreshTokenArgsForCall)] fake.refreshTokenArgsForCall = append(fake.refreshTokenArgsForCall, struct { }{}) + stub := fake.RefreshTokenStub + fakeReturns := fake.refreshTokenReturns fake.recordInvocation("RefreshToken", []interface{}{}) fake.refreshTokenMutex.Unlock() - if fake.RefreshTokenStub != nil { - return fake.RefreshTokenStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.refreshTokenReturns return fakeReturns.result1 } @@ -2220,9 +2251,10 @@ func (fake *FakeConfig) RemovePlugin(arg1 string) { fake.removePluginArgsForCall = append(fake.removePluginArgsForCall, struct { arg1 string }{arg1}) + stub := fake.RemovePluginStub fake.recordInvocation("RemovePlugin", []interface{}{arg1}) fake.removePluginMutex.Unlock() - if fake.RemovePluginStub != nil { + if stub != nil { fake.RemovePluginStub(arg1) } } @@ -2251,15 +2283,16 @@ func (fake *FakeConfig) RequestRetryCount() int { ret, specificReturn := fake.requestRetryCountReturnsOnCall[len(fake.requestRetryCountArgsForCall)] fake.requestRetryCountArgsForCall = append(fake.requestRetryCountArgsForCall, struct { }{}) + stub := fake.RequestRetryCountStub + fakeReturns := fake.requestRetryCountReturns fake.recordInvocation("RequestRetryCount", []interface{}{}) fake.requestRetryCountMutex.Unlock() - if fake.RequestRetryCountStub != nil { - return fake.RequestRetryCountStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.requestRetryCountReturns return fakeReturns.result1 } @@ -2303,15 +2336,16 @@ func (fake *FakeConfig) RoutingEndpoint() string { ret, specificReturn := fake.routingEndpointReturnsOnCall[len(fake.routingEndpointArgsForCall)] fake.routingEndpointArgsForCall = append(fake.routingEndpointArgsForCall, struct { }{}) + stub := fake.RoutingEndpointStub + fakeReturns := fake.routingEndpointReturns fake.recordInvocation("RoutingEndpoint", []interface{}{}) fake.routingEndpointMutex.Unlock() - if fake.RoutingEndpointStub != nil { - return fake.RoutingEndpointStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.routingEndpointReturns return fakeReturns.result1 } @@ -2355,15 +2389,16 @@ func (fake *FakeConfig) SSHOAuthClient() string { ret, specificReturn := fake.sSHOAuthClientReturnsOnCall[len(fake.sSHOAuthClientArgsForCall)] fake.sSHOAuthClientArgsForCall = append(fake.sSHOAuthClientArgsForCall, struct { }{}) + stub := fake.SSHOAuthClientStub + fakeReturns := fake.sSHOAuthClientReturns fake.recordInvocation("SSHOAuthClient", []interface{}{}) fake.sSHOAuthClientMutex.Unlock() - if fake.SSHOAuthClientStub != nil { - return fake.SSHOAuthClientStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.sSHOAuthClientReturns return fakeReturns.result1 } @@ -2407,9 +2442,10 @@ func (fake *FakeConfig) SetAccessToken(arg1 string) { fake.setAccessTokenArgsForCall = append(fake.setAccessTokenArgsForCall, struct { arg1 string }{arg1}) + stub := fake.SetAccessTokenStub fake.recordInvocation("SetAccessToken", []interface{}{arg1}) fake.setAccessTokenMutex.Unlock() - if fake.SetAccessTokenStub != nil { + if stub != nil { fake.SetAccessTokenStub(arg1) } } @@ -2438,9 +2474,10 @@ func (fake *FakeConfig) SetAsyncTimeout(arg1 int) { fake.setAsyncTimeoutArgsForCall = append(fake.setAsyncTimeoutArgsForCall, struct { arg1 int }{arg1}) + stub := fake.SetAsyncTimeoutStub fake.recordInvocation("SetAsyncTimeout", []interface{}{arg1}) fake.setAsyncTimeoutMutex.Unlock() - if fake.SetAsyncTimeoutStub != nil { + if stub != nil { fake.SetAsyncTimeoutStub(arg1) } } @@ -2469,9 +2506,10 @@ func (fake *FakeConfig) SetColorEnabled(arg1 string) { fake.setColorEnabledArgsForCall = append(fake.setColorEnabledArgsForCall, struct { arg1 string }{arg1}) + stub := fake.SetColorEnabledStub fake.recordInvocation("SetColorEnabled", []interface{}{arg1}) fake.setColorEnabledMutex.Unlock() - if fake.SetColorEnabledStub != nil { + if stub != nil { fake.SetColorEnabledStub(arg1) } } @@ -2500,9 +2538,10 @@ func (fake *FakeConfig) SetLocale(arg1 string) { fake.setLocaleArgsForCall = append(fake.setLocaleArgsForCall, struct { arg1 string }{arg1}) + stub := fake.SetLocaleStub fake.recordInvocation("SetLocale", []interface{}{arg1}) fake.setLocaleMutex.Unlock() - if fake.SetLocaleStub != nil { + if stub != nil { fake.SetLocaleStub(arg1) } } @@ -2531,9 +2570,10 @@ func (fake *FakeConfig) SetMinCLIVersion(arg1 string) { fake.setMinCLIVersionArgsForCall = append(fake.setMinCLIVersionArgsForCall, struct { arg1 string }{arg1}) + stub := fake.SetMinCLIVersionStub fake.recordInvocation("SetMinCLIVersion", []interface{}{arg1}) fake.setMinCLIVersionMutex.Unlock() - if fake.SetMinCLIVersionStub != nil { + if stub != nil { fake.SetMinCLIVersionStub(arg1) } } @@ -2563,9 +2603,10 @@ func (fake *FakeConfig) SetOrganizationInformation(arg1 string, arg2 string) { arg1 string arg2 string }{arg1, arg2}) + stub := fake.SetOrganizationInformationStub fake.recordInvocation("SetOrganizationInformation", []interface{}{arg1, arg2}) fake.setOrganizationInformationMutex.Unlock() - if fake.SetOrganizationInformationStub != nil { + if stub != nil { fake.SetOrganizationInformationStub(arg1, arg2) } } @@ -2594,9 +2635,10 @@ func (fake *FakeConfig) SetRefreshToken(arg1 string) { fake.setRefreshTokenArgsForCall = append(fake.setRefreshTokenArgsForCall, struct { arg1 string }{arg1}) + stub := fake.SetRefreshTokenStub fake.recordInvocation("SetRefreshToken", []interface{}{arg1}) fake.setRefreshTokenMutex.Unlock() - if fake.SetRefreshTokenStub != nil { + if stub != nil { fake.SetRefreshTokenStub(arg1) } } @@ -2627,9 +2669,10 @@ func (fake *FakeConfig) SetSpaceInformation(arg1 string, arg2 string, arg3 bool) arg2 string arg3 bool }{arg1, arg2, arg3}) + stub := fake.SetSpaceInformationStub fake.recordInvocation("SetSpaceInformation", []interface{}{arg1, arg2, arg3}) fake.setSpaceInformationMutex.Unlock() - if fake.SetSpaceInformationStub != nil { + if stub != nil { fake.SetSpaceInformationStub(arg1, arg2, arg3) } } @@ -2658,9 +2701,10 @@ func (fake *FakeConfig) SetTargetInformation(arg1 configv3.TargetInformationArgs fake.setTargetInformationArgsForCall = append(fake.setTargetInformationArgsForCall, struct { arg1 configv3.TargetInformationArgs }{arg1}) + stub := fake.SetTargetInformationStub fake.recordInvocation("SetTargetInformation", []interface{}{arg1}) fake.setTargetInformationMutex.Unlock() - if fake.SetTargetInformationStub != nil { + if stub != nil { fake.SetTargetInformationStub(arg1) } } @@ -2691,9 +2735,10 @@ func (fake *FakeConfig) SetTokenInformation(arg1 string, arg2 string, arg3 strin arg2 string arg3 string }{arg1, arg2, arg3}) + stub := fake.SetTokenInformationStub fake.recordInvocation("SetTokenInformation", []interface{}{arg1, arg2, arg3}) fake.setTokenInformationMutex.Unlock() - if fake.SetTokenInformationStub != nil { + if stub != nil { fake.SetTokenInformationStub(arg1, arg2, arg3) } } @@ -2722,9 +2767,10 @@ func (fake *FakeConfig) SetTrace(arg1 string) { fake.setTraceArgsForCall = append(fake.setTraceArgsForCall, struct { arg1 string }{arg1}) + stub := fake.SetTraceStub fake.recordInvocation("SetTrace", []interface{}{arg1}) fake.setTraceMutex.Unlock() - if fake.SetTraceStub != nil { + if stub != nil { fake.SetTraceStub(arg1) } } @@ -2754,9 +2800,10 @@ func (fake *FakeConfig) SetUAAClientCredentials(arg1 string, arg2 string) { arg1 string arg2 string }{arg1, arg2}) + stub := fake.SetUAAClientCredentialsStub fake.recordInvocation("SetUAAClientCredentials", []interface{}{arg1, arg2}) fake.setUAAClientCredentialsMutex.Unlock() - if fake.SetUAAClientCredentialsStub != nil { + if stub != nil { fake.SetUAAClientCredentialsStub(arg1, arg2) } } @@ -2785,9 +2832,10 @@ func (fake *FakeConfig) SetUAAEndpoint(arg1 string) { fake.setUAAEndpointArgsForCall = append(fake.setUAAEndpointArgsForCall, struct { arg1 string }{arg1}) + stub := fake.SetUAAEndpointStub fake.recordInvocation("SetUAAEndpoint", []interface{}{arg1}) fake.setUAAEndpointMutex.Unlock() - if fake.SetUAAEndpointStub != nil { + if stub != nil { fake.SetUAAEndpointStub(arg1) } } @@ -2816,9 +2864,10 @@ func (fake *FakeConfig) SetUAAGrantType(arg1 string) { fake.setUAAGrantTypeArgsForCall = append(fake.setUAAGrantTypeArgsForCall, struct { arg1 string }{arg1}) + stub := fake.SetUAAGrantTypeStub fake.recordInvocation("SetUAAGrantType", []interface{}{arg1}) fake.setUAAGrantTypeMutex.Unlock() - if fake.SetUAAGrantTypeStub != nil { + if stub != nil { fake.SetUAAGrantTypeStub(arg1) } } @@ -2847,15 +2896,16 @@ func (fake *FakeConfig) SkipSSLValidation() bool { ret, specificReturn := fake.skipSSLValidationReturnsOnCall[len(fake.skipSSLValidationArgsForCall)] fake.skipSSLValidationArgsForCall = append(fake.skipSSLValidationArgsForCall, struct { }{}) + stub := fake.SkipSSLValidationStub + fakeReturns := fake.skipSSLValidationReturns fake.recordInvocation("SkipSSLValidation", []interface{}{}) fake.skipSSLValidationMutex.Unlock() - if fake.SkipSSLValidationStub != nil { - return fake.SkipSSLValidationStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.skipSSLValidationReturns return fakeReturns.result1 } @@ -2899,15 +2949,16 @@ func (fake *FakeConfig) StagingTimeout() time.Duration { ret, specificReturn := fake.stagingTimeoutReturnsOnCall[len(fake.stagingTimeoutArgsForCall)] fake.stagingTimeoutArgsForCall = append(fake.stagingTimeoutArgsForCall, struct { }{}) + stub := fake.StagingTimeoutStub + fakeReturns := fake.stagingTimeoutReturns fake.recordInvocation("StagingTimeout", []interface{}{}) fake.stagingTimeoutMutex.Unlock() - if fake.StagingTimeoutStub != nil { - return fake.StagingTimeoutStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.stagingTimeoutReturns return fakeReturns.result1 } @@ -2951,15 +3002,16 @@ func (fake *FakeConfig) StartupTimeout() time.Duration { ret, specificReturn := fake.startupTimeoutReturnsOnCall[len(fake.startupTimeoutArgsForCall)] fake.startupTimeoutArgsForCall = append(fake.startupTimeoutArgsForCall, struct { }{}) + stub := fake.StartupTimeoutStub + fakeReturns := fake.startupTimeoutReturns fake.recordInvocation("StartupTimeout", []interface{}{}) fake.startupTimeoutMutex.Unlock() - if fake.StartupTimeoutStub != nil { - return fake.StartupTimeoutStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.startupTimeoutReturns return fakeReturns.result1 } @@ -3003,15 +3055,16 @@ func (fake *FakeConfig) Target() string { ret, specificReturn := fake.targetReturnsOnCall[len(fake.targetArgsForCall)] fake.targetArgsForCall = append(fake.targetArgsForCall, struct { }{}) + stub := fake.TargetStub + fakeReturns := fake.targetReturns fake.recordInvocation("Target", []interface{}{}) fake.targetMutex.Unlock() - if fake.TargetStub != nil { - return fake.TargetStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.targetReturns return fakeReturns.result1 } @@ -3055,15 +3108,16 @@ func (fake *FakeConfig) TargetedOrganization() configv3.Organization { ret, specificReturn := fake.targetedOrganizationReturnsOnCall[len(fake.targetedOrganizationArgsForCall)] fake.targetedOrganizationArgsForCall = append(fake.targetedOrganizationArgsForCall, struct { }{}) + stub := fake.TargetedOrganizationStub + fakeReturns := fake.targetedOrganizationReturns fake.recordInvocation("TargetedOrganization", []interface{}{}) fake.targetedOrganizationMutex.Unlock() - if fake.TargetedOrganizationStub != nil { - return fake.TargetedOrganizationStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.targetedOrganizationReturns return fakeReturns.result1 } @@ -3107,15 +3161,16 @@ func (fake *FakeConfig) TargetedOrganizationName() string { ret, specificReturn := fake.targetedOrganizationNameReturnsOnCall[len(fake.targetedOrganizationNameArgsForCall)] fake.targetedOrganizationNameArgsForCall = append(fake.targetedOrganizationNameArgsForCall, struct { }{}) + stub := fake.TargetedOrganizationNameStub + fakeReturns := fake.targetedOrganizationNameReturns fake.recordInvocation("TargetedOrganizationName", []interface{}{}) fake.targetedOrganizationNameMutex.Unlock() - if fake.TargetedOrganizationNameStub != nil { - return fake.TargetedOrganizationNameStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.targetedOrganizationNameReturns return fakeReturns.result1 } @@ -3159,15 +3214,16 @@ func (fake *FakeConfig) TargetedSpace() configv3.Space { ret, specificReturn := fake.targetedSpaceReturnsOnCall[len(fake.targetedSpaceArgsForCall)] fake.targetedSpaceArgsForCall = append(fake.targetedSpaceArgsForCall, struct { }{}) + stub := fake.TargetedSpaceStub + fakeReturns := fake.targetedSpaceReturns fake.recordInvocation("TargetedSpace", []interface{}{}) fake.targetedSpaceMutex.Unlock() - if fake.TargetedSpaceStub != nil { - return fake.TargetedSpaceStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.targetedSpaceReturns return fakeReturns.result1 } @@ -3211,15 +3267,16 @@ func (fake *FakeConfig) TerminalWidth() int { ret, specificReturn := fake.terminalWidthReturnsOnCall[len(fake.terminalWidthArgsForCall)] fake.terminalWidthArgsForCall = append(fake.terminalWidthArgsForCall, struct { }{}) + stub := fake.TerminalWidthStub + fakeReturns := fake.terminalWidthReturns fake.recordInvocation("TerminalWidth", []interface{}{}) fake.terminalWidthMutex.Unlock() - if fake.TerminalWidthStub != nil { - return fake.TerminalWidthStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.terminalWidthReturns return fakeReturns.result1 } @@ -3263,15 +3320,16 @@ func (fake *FakeConfig) UAADisableKeepAlives() bool { ret, specificReturn := fake.uAADisableKeepAlivesReturnsOnCall[len(fake.uAADisableKeepAlivesArgsForCall)] fake.uAADisableKeepAlivesArgsForCall = append(fake.uAADisableKeepAlivesArgsForCall, struct { }{}) + stub := fake.UAADisableKeepAlivesStub + fakeReturns := fake.uAADisableKeepAlivesReturns fake.recordInvocation("UAADisableKeepAlives", []interface{}{}) fake.uAADisableKeepAlivesMutex.Unlock() - if fake.UAADisableKeepAlivesStub != nil { - return fake.UAADisableKeepAlivesStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.uAADisableKeepAlivesReturns return fakeReturns.result1 } @@ -3315,15 +3373,16 @@ func (fake *FakeConfig) UAAEndpoint() string { ret, specificReturn := fake.uAAEndpointReturnsOnCall[len(fake.uAAEndpointArgsForCall)] fake.uAAEndpointArgsForCall = append(fake.uAAEndpointArgsForCall, struct { }{}) + stub := fake.UAAEndpointStub + fakeReturns := fake.uAAEndpointReturns fake.recordInvocation("UAAEndpoint", []interface{}{}) fake.uAAEndpointMutex.Unlock() - if fake.UAAEndpointStub != nil { - return fake.UAAEndpointStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.uAAEndpointReturns return fakeReturns.result1 } @@ -3367,15 +3426,16 @@ func (fake *FakeConfig) UAAGrantType() string { ret, specificReturn := fake.uAAGrantTypeReturnsOnCall[len(fake.uAAGrantTypeArgsForCall)] fake.uAAGrantTypeArgsForCall = append(fake.uAAGrantTypeArgsForCall, struct { }{}) + stub := fake.UAAGrantTypeStub + fakeReturns := fake.uAAGrantTypeReturns fake.recordInvocation("UAAGrantType", []interface{}{}) fake.uAAGrantTypeMutex.Unlock() - if fake.UAAGrantTypeStub != nil { - return fake.UAAGrantTypeStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.uAAGrantTypeReturns return fakeReturns.result1 } @@ -3419,15 +3479,16 @@ func (fake *FakeConfig) UAAOAuthClient() string { ret, specificReturn := fake.uAAOAuthClientReturnsOnCall[len(fake.uAAOAuthClientArgsForCall)] fake.uAAOAuthClientArgsForCall = append(fake.uAAOAuthClientArgsForCall, struct { }{}) + stub := fake.UAAOAuthClientStub + fakeReturns := fake.uAAOAuthClientReturns fake.recordInvocation("UAAOAuthClient", []interface{}{}) fake.uAAOAuthClientMutex.Unlock() - if fake.UAAOAuthClientStub != nil { - return fake.UAAOAuthClientStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.uAAOAuthClientReturns return fakeReturns.result1 } @@ -3471,15 +3532,16 @@ func (fake *FakeConfig) UAAOAuthClientSecret() string { ret, specificReturn := fake.uAAOAuthClientSecretReturnsOnCall[len(fake.uAAOAuthClientSecretArgsForCall)] fake.uAAOAuthClientSecretArgsForCall = append(fake.uAAOAuthClientSecretArgsForCall, struct { }{}) + stub := fake.UAAOAuthClientSecretStub + fakeReturns := fake.uAAOAuthClientSecretReturns fake.recordInvocation("UAAOAuthClientSecret", []interface{}{}) fake.uAAOAuthClientSecretMutex.Unlock() - if fake.UAAOAuthClientSecretStub != nil { - return fake.UAAOAuthClientSecretStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.uAAOAuthClientSecretReturns return fakeReturns.result1 } @@ -3522,9 +3584,10 @@ func (fake *FakeConfig) UnsetOrganizationAndSpaceInformation() { fake.unsetOrganizationAndSpaceInformationMutex.Lock() fake.unsetOrganizationAndSpaceInformationArgsForCall = append(fake.unsetOrganizationAndSpaceInformationArgsForCall, struct { }{}) + stub := fake.UnsetOrganizationAndSpaceInformationStub fake.recordInvocation("UnsetOrganizationAndSpaceInformation", []interface{}{}) fake.unsetOrganizationAndSpaceInformationMutex.Unlock() - if fake.UnsetOrganizationAndSpaceInformationStub != nil { + if stub != nil { fake.UnsetOrganizationAndSpaceInformationStub() } } @@ -3545,9 +3608,10 @@ func (fake *FakeConfig) UnsetSpaceInformation() { fake.unsetSpaceInformationMutex.Lock() fake.unsetSpaceInformationArgsForCall = append(fake.unsetSpaceInformationArgsForCall, struct { }{}) + stub := fake.UnsetSpaceInformationStub fake.recordInvocation("UnsetSpaceInformation", []interface{}{}) fake.unsetSpaceInformationMutex.Unlock() - if fake.UnsetSpaceInformationStub != nil { + if stub != nil { fake.UnsetSpaceInformationStub() } } @@ -3568,9 +3632,10 @@ func (fake *FakeConfig) UnsetUserInformation() { fake.unsetUserInformationMutex.Lock() fake.unsetUserInformationArgsForCall = append(fake.unsetUserInformationArgsForCall, struct { }{}) + stub := fake.UnsetUserInformationStub fake.recordInvocation("UnsetUserInformation", []interface{}{}) fake.unsetUserInformationMutex.Unlock() - if fake.UnsetUserInformationStub != nil { + if stub != nil { fake.UnsetUserInformationStub() } } @@ -3593,9 +3658,10 @@ func (fake *FakeConfig) V7SetSpaceInformation(arg1 string, arg2 string) { arg1 string arg2 string }{arg1, arg2}) + stub := fake.V7SetSpaceInformationStub fake.recordInvocation("V7SetSpaceInformation", []interface{}{arg1, arg2}) fake.v7SetSpaceInformationMutex.Unlock() - if fake.V7SetSpaceInformationStub != nil { + if stub != nil { fake.V7SetSpaceInformationStub(arg1, arg2) } } @@ -3624,15 +3690,16 @@ func (fake *FakeConfig) Verbose() (bool, []string) { ret, specificReturn := fake.verboseReturnsOnCall[len(fake.verboseArgsForCall)] fake.verboseArgsForCall = append(fake.verboseArgsForCall, struct { }{}) + stub := fake.VerboseStub + fakeReturns := fake.verboseReturns fake.recordInvocation("Verbose", []interface{}{}) fake.verboseMutex.Unlock() - if fake.VerboseStub != nil { - return fake.VerboseStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1, ret.result2 } - fakeReturns := fake.verboseReturns return fakeReturns.result1, fakeReturns.result2 } @@ -3679,15 +3746,16 @@ func (fake *FakeConfig) WriteConfig() error { ret, specificReturn := fake.writeConfigReturnsOnCall[len(fake.writeConfigArgsForCall)] fake.writeConfigArgsForCall = append(fake.writeConfigArgsForCall, struct { }{}) + stub := fake.WriteConfigStub + fakeReturns := fake.writeConfigReturns fake.recordInvocation("WriteConfig", []interface{}{}) fake.writeConfigMutex.Unlock() - if fake.WriteConfigStub != nil { - return fake.WriteConfigStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.writeConfigReturns return fakeReturns.result1 } @@ -3731,15 +3799,16 @@ func (fake *FakeConfig) WritePluginConfig() error { ret, specificReturn := fake.writePluginConfigReturnsOnCall[len(fake.writePluginConfigArgsForCall)] fake.writePluginConfigArgsForCall = append(fake.writePluginConfigArgsForCall, struct { }{}) + stub := fake.WritePluginConfigStub + fakeReturns := fake.writePluginConfigReturns fake.recordInvocation("WritePluginConfig", []interface{}{}) fake.writePluginConfigMutex.Unlock() - if fake.WritePluginConfigStub != nil { - return fake.WritePluginConfigStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.writePluginConfigReturns return fakeReturns.result1 } diff --git a/command/commandfakes/fake_shared_actor.go b/command/commandfakes/fake_shared_actor.go index fec3b1b77d3..b47add345b8 100644 --- a/command/commandfakes/fake_shared_actor.go +++ b/command/commandfakes/fake_shared_actor.go @@ -85,15 +85,16 @@ func (fake *FakeSharedActor) CheckTarget(arg1 bool, arg2 bool) error { arg1 bool arg2 bool }{arg1, arg2}) + stub := fake.CheckTargetStub + fakeReturns := fake.checkTargetReturns fake.recordInvocation("CheckTarget", []interface{}{arg1, arg2}) fake.checkTargetMutex.Unlock() - if fake.CheckTargetStub != nil { - return fake.CheckTargetStub(arg1, arg2) + if stub != nil { + return stub(arg1, arg2) } if specificReturn { return ret.result1 } - fakeReturns := fake.checkTargetReturns return fakeReturns.result1 } @@ -144,15 +145,16 @@ func (fake *FakeSharedActor) IsLoggedIn() bool { ret, specificReturn := fake.isLoggedInReturnsOnCall[len(fake.isLoggedInArgsForCall)] fake.isLoggedInArgsForCall = append(fake.isLoggedInArgsForCall, struct { }{}) + stub := fake.IsLoggedInStub + fakeReturns := fake.isLoggedInReturns fake.recordInvocation("IsLoggedIn", []interface{}{}) fake.isLoggedInMutex.Unlock() - if fake.IsLoggedInStub != nil { - return fake.IsLoggedInStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.isLoggedInReturns return fakeReturns.result1 } @@ -196,15 +198,16 @@ func (fake *FakeSharedActor) IsOrgTargeted() bool { ret, specificReturn := fake.isOrgTargetedReturnsOnCall[len(fake.isOrgTargetedArgsForCall)] fake.isOrgTargetedArgsForCall = append(fake.isOrgTargetedArgsForCall, struct { }{}) + stub := fake.IsOrgTargetedStub + fakeReturns := fake.isOrgTargetedReturns fake.recordInvocation("IsOrgTargeted", []interface{}{}) fake.isOrgTargetedMutex.Unlock() - if fake.IsOrgTargetedStub != nil { - return fake.IsOrgTargetedStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.isOrgTargetedReturns return fakeReturns.result1 } @@ -248,15 +251,16 @@ func (fake *FakeSharedActor) IsSpaceTargeted() bool { ret, specificReturn := fake.isSpaceTargetedReturnsOnCall[len(fake.isSpaceTargetedArgsForCall)] fake.isSpaceTargetedArgsForCall = append(fake.isSpaceTargetedArgsForCall, struct { }{}) + stub := fake.IsSpaceTargetedStub + fakeReturns := fake.isSpaceTargetedReturns fake.recordInvocation("IsSpaceTargeted", []interface{}{}) fake.isSpaceTargetedMutex.Unlock() - if fake.IsSpaceTargetedStub != nil { - return fake.IsSpaceTargetedStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.isSpaceTargetedReturns return fakeReturns.result1 } @@ -300,15 +304,16 @@ func (fake *FakeSharedActor) RequireCurrentUser() (string, error) { ret, specificReturn := fake.requireCurrentUserReturnsOnCall[len(fake.requireCurrentUserArgsForCall)] fake.requireCurrentUserArgsForCall = append(fake.requireCurrentUserArgsForCall, struct { }{}) + stub := fake.RequireCurrentUserStub + fakeReturns := fake.requireCurrentUserReturns fake.recordInvocation("RequireCurrentUser", []interface{}{}) fake.requireCurrentUserMutex.Unlock() - if fake.RequireCurrentUserStub != nil { - return fake.RequireCurrentUserStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1, ret.result2 } - fakeReturns := fake.requireCurrentUserReturns return fakeReturns.result1, fakeReturns.result2 } @@ -355,15 +360,16 @@ func (fake *FakeSharedActor) RequireTargetedOrg() (string, error) { ret, specificReturn := fake.requireTargetedOrgReturnsOnCall[len(fake.requireTargetedOrgArgsForCall)] fake.requireTargetedOrgArgsForCall = append(fake.requireTargetedOrgArgsForCall, struct { }{}) + stub := fake.RequireTargetedOrgStub + fakeReturns := fake.requireTargetedOrgReturns fake.recordInvocation("RequireTargetedOrg", []interface{}{}) fake.requireTargetedOrgMutex.Unlock() - if fake.RequireTargetedOrgStub != nil { - return fake.RequireTargetedOrgStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1, ret.result2 } - fakeReturns := fake.requireTargetedOrgReturns return fakeReturns.result1, fakeReturns.result2 } diff --git a/command/commandfakes/fake_ui.go b/command/commandfakes/fake_ui.go index 377c901110a..c4711e8f8fa 100644 --- a/command/commandfakes/fake_ui.go +++ b/command/commandfakes/fake_ui.go @@ -47,23 +47,26 @@ type FakeUI struct { displayDeprecationWarningMutex sync.RWMutex displayDeprecationWarningArgsForCall []struct { } - DisplayDiffAdditionStub func(string, int) + DisplayDiffAdditionStub func(string, int, bool) displayDiffAdditionMutex sync.RWMutex displayDiffAdditionArgsForCall []struct { arg1 string arg2 int + arg3 bool } - DisplayDiffRemovalStub func(string, int) + DisplayDiffRemovalStub func(string, int, bool) displayDiffRemovalMutex sync.RWMutex displayDiffRemovalArgsForCall []struct { arg1 string arg2 int + arg3 bool } - DisplayDiffUnchangedStub func(string, int) + DisplayDiffUnchangedStub func(string, int, bool) displayDiffUnchangedMutex sync.RWMutex displayDiffUnchangedArgsForCall []struct { arg1 string arg2 int + arg3 bool } DisplayErrorStub func(error) displayErrorMutex sync.RWMutex @@ -305,9 +308,10 @@ func (fake *FakeUI) DeferText(arg1 string, arg2 ...map[string]interface{}) { arg1 string arg2 []map[string]interface{} }{arg1, arg2}) + stub := fake.DeferTextStub fake.recordInvocation("DeferText", []interface{}{arg1, arg2}) fake.deferTextMutex.Unlock() - if fake.DeferTextStub != nil { + if stub != nil { fake.DeferTextStub(arg1, arg2...) } } @@ -339,15 +343,16 @@ func (fake *FakeUI) DisplayBoolPrompt(arg1 bool, arg2 string, arg3 ...map[string arg2 string arg3 []map[string]interface{} }{arg1, arg2, arg3}) + stub := fake.DisplayBoolPromptStub + fakeReturns := fake.displayBoolPromptReturns fake.recordInvocation("DisplayBoolPrompt", []interface{}{arg1, arg2, arg3}) fake.displayBoolPromptMutex.Unlock() - if fake.DisplayBoolPromptStub != nil { - return fake.DisplayBoolPromptStub(arg1, arg2, arg3...) + if stub != nil { + return stub(arg1, arg2, arg3...) } if specificReturn { return ret.result1, ret.result2 } - fakeReturns := fake.displayBoolPromptReturns return fakeReturns.result1, fakeReturns.result2 } @@ -407,15 +412,16 @@ func (fake *FakeUI) DisplayChangesForPush(arg1 []ui.Change) error { fake.displayChangesForPushArgsForCall = append(fake.displayChangesForPushArgsForCall, struct { arg1 []ui.Change }{arg1Copy}) + stub := fake.DisplayChangesForPushStub + fakeReturns := fake.displayChangesForPushReturns fake.recordInvocation("DisplayChangesForPush", []interface{}{arg1Copy}) fake.displayChangesForPushMutex.Unlock() - if fake.DisplayChangesForPushStub != nil { - return fake.DisplayChangesForPushStub(arg1) + if stub != nil { + return stub(arg1) } if specificReturn { return ret.result1 } - fakeReturns := fake.displayChangesForPushReturns return fakeReturns.result1 } @@ -465,9 +471,10 @@ func (fake *FakeUI) DisplayDeprecationWarning() { fake.displayDeprecationWarningMutex.Lock() fake.displayDeprecationWarningArgsForCall = append(fake.displayDeprecationWarningArgsForCall, struct { }{}) + stub := fake.DisplayDeprecationWarningStub fake.recordInvocation("DisplayDeprecationWarning", []interface{}{}) fake.displayDeprecationWarningMutex.Unlock() - if fake.DisplayDeprecationWarningStub != nil { + if stub != nil { fake.DisplayDeprecationWarningStub() } } @@ -484,16 +491,18 @@ func (fake *FakeUI) DisplayDeprecationWarningCalls(stub func()) { fake.DisplayDeprecationWarningStub = stub } -func (fake *FakeUI) DisplayDiffAddition(arg1 string, arg2 int) { +func (fake *FakeUI) DisplayDiffAddition(arg1 string, arg2 int, arg3 bool) { fake.displayDiffAdditionMutex.Lock() fake.displayDiffAdditionArgsForCall = append(fake.displayDiffAdditionArgsForCall, struct { arg1 string arg2 int - }{arg1, arg2}) - fake.recordInvocation("DisplayDiffAddition", []interface{}{arg1, arg2}) + arg3 bool + }{arg1, arg2, arg3}) + stub := fake.DisplayDiffAdditionStub + fake.recordInvocation("DisplayDiffAddition", []interface{}{arg1, arg2, arg3}) fake.displayDiffAdditionMutex.Unlock() - if fake.DisplayDiffAdditionStub != nil { - fake.DisplayDiffAdditionStub(arg1, arg2) + if stub != nil { + fake.DisplayDiffAdditionStub(arg1, arg2, arg3) } } @@ -503,29 +512,31 @@ func (fake *FakeUI) DisplayDiffAdditionCallCount() int { return len(fake.displayDiffAdditionArgsForCall) } -func (fake *FakeUI) DisplayDiffAdditionCalls(stub func(string, int)) { +func (fake *FakeUI) DisplayDiffAdditionCalls(stub func(string, int, bool)) { fake.displayDiffAdditionMutex.Lock() defer fake.displayDiffAdditionMutex.Unlock() fake.DisplayDiffAdditionStub = stub } -func (fake *FakeUI) DisplayDiffAdditionArgsForCall(i int) (string, int) { +func (fake *FakeUI) DisplayDiffAdditionArgsForCall(i int) (string, int, bool) { fake.displayDiffAdditionMutex.RLock() defer fake.displayDiffAdditionMutex.RUnlock() argsForCall := fake.displayDiffAdditionArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 + return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 } -func (fake *FakeUI) DisplayDiffRemoval(arg1 string, arg2 int) { +func (fake *FakeUI) DisplayDiffRemoval(arg1 string, arg2 int, arg3 bool) { fake.displayDiffRemovalMutex.Lock() fake.displayDiffRemovalArgsForCall = append(fake.displayDiffRemovalArgsForCall, struct { arg1 string arg2 int - }{arg1, arg2}) - fake.recordInvocation("DisplayDiffRemoval", []interface{}{arg1, arg2}) + arg3 bool + }{arg1, arg2, arg3}) + stub := fake.DisplayDiffRemovalStub + fake.recordInvocation("DisplayDiffRemoval", []interface{}{arg1, arg2, arg3}) fake.displayDiffRemovalMutex.Unlock() - if fake.DisplayDiffRemovalStub != nil { - fake.DisplayDiffRemovalStub(arg1, arg2) + if stub != nil { + fake.DisplayDiffRemovalStub(arg1, arg2, arg3) } } @@ -535,29 +546,31 @@ func (fake *FakeUI) DisplayDiffRemovalCallCount() int { return len(fake.displayDiffRemovalArgsForCall) } -func (fake *FakeUI) DisplayDiffRemovalCalls(stub func(string, int)) { +func (fake *FakeUI) DisplayDiffRemovalCalls(stub func(string, int, bool)) { fake.displayDiffRemovalMutex.Lock() defer fake.displayDiffRemovalMutex.Unlock() fake.DisplayDiffRemovalStub = stub } -func (fake *FakeUI) DisplayDiffRemovalArgsForCall(i int) (string, int) { +func (fake *FakeUI) DisplayDiffRemovalArgsForCall(i int) (string, int, bool) { fake.displayDiffRemovalMutex.RLock() defer fake.displayDiffRemovalMutex.RUnlock() argsForCall := fake.displayDiffRemovalArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 + return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 } -func (fake *FakeUI) DisplayDiffUnchanged(arg1 string, arg2 int) { +func (fake *FakeUI) DisplayDiffUnchanged(arg1 string, arg2 int, arg3 bool) { fake.displayDiffUnchangedMutex.Lock() fake.displayDiffUnchangedArgsForCall = append(fake.displayDiffUnchangedArgsForCall, struct { arg1 string arg2 int - }{arg1, arg2}) - fake.recordInvocation("DisplayDiffUnchanged", []interface{}{arg1, arg2}) + arg3 bool + }{arg1, arg2, arg3}) + stub := fake.DisplayDiffUnchangedStub + fake.recordInvocation("DisplayDiffUnchanged", []interface{}{arg1, arg2, arg3}) fake.displayDiffUnchangedMutex.Unlock() - if fake.DisplayDiffUnchangedStub != nil { - fake.DisplayDiffUnchangedStub(arg1, arg2) + if stub != nil { + fake.DisplayDiffUnchangedStub(arg1, arg2, arg3) } } @@ -567,17 +580,17 @@ func (fake *FakeUI) DisplayDiffUnchangedCallCount() int { return len(fake.displayDiffUnchangedArgsForCall) } -func (fake *FakeUI) DisplayDiffUnchangedCalls(stub func(string, int)) { +func (fake *FakeUI) DisplayDiffUnchangedCalls(stub func(string, int, bool)) { fake.displayDiffUnchangedMutex.Lock() defer fake.displayDiffUnchangedMutex.Unlock() fake.DisplayDiffUnchangedStub = stub } -func (fake *FakeUI) DisplayDiffUnchangedArgsForCall(i int) (string, int) { +func (fake *FakeUI) DisplayDiffUnchangedArgsForCall(i int) (string, int, bool) { fake.displayDiffUnchangedMutex.RLock() defer fake.displayDiffUnchangedMutex.RUnlock() argsForCall := fake.displayDiffUnchangedArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 + return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 } func (fake *FakeUI) DisplayError(arg1 error) { @@ -585,9 +598,10 @@ func (fake *FakeUI) DisplayError(arg1 error) { fake.displayErrorArgsForCall = append(fake.displayErrorArgsForCall, struct { arg1 error }{arg1}) + stub := fake.DisplayErrorStub fake.recordInvocation("DisplayError", []interface{}{arg1}) fake.displayErrorMutex.Unlock() - if fake.DisplayErrorStub != nil { + if stub != nil { fake.DisplayErrorStub(arg1) } } @@ -615,9 +629,10 @@ func (fake *FakeUI) DisplayFileDeprecationWarning() { fake.displayFileDeprecationWarningMutex.Lock() fake.displayFileDeprecationWarningArgsForCall = append(fake.displayFileDeprecationWarningArgsForCall, struct { }{}) + stub := fake.DisplayFileDeprecationWarningStub fake.recordInvocation("DisplayFileDeprecationWarning", []interface{}{}) fake.displayFileDeprecationWarningMutex.Unlock() - if fake.DisplayFileDeprecationWarningStub != nil { + if stub != nil { fake.DisplayFileDeprecationWarningStub() } } @@ -639,9 +654,10 @@ func (fake *FakeUI) DisplayHeader(arg1 string) { fake.displayHeaderArgsForCall = append(fake.displayHeaderArgsForCall, struct { arg1 string }{arg1}) + stub := fake.DisplayHeaderStub fake.recordInvocation("DisplayHeader", []interface{}{arg1}) fake.displayHeaderMutex.Unlock() - if fake.DisplayHeaderStub != nil { + if stub != nil { fake.DisplayHeaderStub(arg1) } } @@ -675,9 +691,10 @@ func (fake *FakeUI) DisplayInstancesTableForApp(arg1 [][]string) { fake.displayInstancesTableForAppArgsForCall = append(fake.displayInstancesTableForAppArgsForCall, struct { arg1 [][]string }{arg1Copy}) + stub := fake.DisplayInstancesTableForAppStub fake.recordInvocation("DisplayInstancesTableForApp", []interface{}{arg1Copy}) fake.displayInstancesTableForAppMutex.Unlock() - if fake.DisplayInstancesTableForAppStub != nil { + if stub != nil { fake.DisplayInstancesTableForAppStub(arg1) } } @@ -713,9 +730,10 @@ func (fake *FakeUI) DisplayKeyValueTable(arg1 string, arg2 [][]string, arg3 int) arg2 [][]string arg3 int }{arg1, arg2Copy, arg3}) + stub := fake.DisplayKeyValueTableStub fake.recordInvocation("DisplayKeyValueTable", []interface{}{arg1, arg2Copy, arg3}) fake.displayKeyValueTableMutex.Unlock() - if fake.DisplayKeyValueTableStub != nil { + if stub != nil { fake.DisplayKeyValueTableStub(arg1, arg2, arg3) } } @@ -749,9 +767,10 @@ func (fake *FakeUI) DisplayKeyValueTableForApp(arg1 [][]string) { fake.displayKeyValueTableForAppArgsForCall = append(fake.displayKeyValueTableForAppArgsForCall, struct { arg1 [][]string }{arg1Copy}) + stub := fake.DisplayKeyValueTableForAppStub fake.recordInvocation("DisplayKeyValueTableForApp", []interface{}{arg1Copy}) fake.displayKeyValueTableForAppMutex.Unlock() - if fake.DisplayKeyValueTableForAppStub != nil { + if stub != nil { fake.DisplayKeyValueTableForAppStub(arg1) } } @@ -781,9 +800,10 @@ func (fake *FakeUI) DisplayLogMessage(arg1 ui.LogMessage, arg2 bool) { arg1 ui.LogMessage arg2 bool }{arg1, arg2}) + stub := fake.DisplayLogMessageStub fake.recordInvocation("DisplayLogMessage", []interface{}{arg1, arg2}) fake.displayLogMessageMutex.Unlock() - if fake.DisplayLogMessageStub != nil { + if stub != nil { fake.DisplayLogMessageStub(arg1, arg2) } } @@ -811,9 +831,10 @@ func (fake *FakeUI) DisplayNewline() { fake.displayNewlineMutex.Lock() fake.displayNewlineArgsForCall = append(fake.displayNewlineArgsForCall, struct { }{}) + stub := fake.DisplayNewlineStub fake.recordInvocation("DisplayNewline", []interface{}{}) fake.displayNewlineMutex.Unlock() - if fake.DisplayNewlineStub != nil { + if stub != nil { fake.DisplayNewlineStub() } } @@ -842,9 +863,10 @@ func (fake *FakeUI) DisplayNonWrappingTable(arg1 string, arg2 [][]string, arg3 i arg2 [][]string arg3 int }{arg1, arg2Copy, arg3}) + stub := fake.DisplayNonWrappingTableStub fake.recordInvocation("DisplayNonWrappingTable", []interface{}{arg1, arg2Copy, arg3}) fake.displayNonWrappingTableMutex.Unlock() - if fake.DisplayNonWrappingTableStub != nil { + if stub != nil { fake.DisplayNonWrappingTableStub(arg1, arg2, arg3) } } @@ -872,9 +894,10 @@ func (fake *FakeUI) DisplayOK() { fake.displayOKMutex.Lock() fake.displayOKArgsForCall = append(fake.displayOKArgsForCall, struct { }{}) + stub := fake.DisplayOKStub fake.recordInvocation("DisplayOK", []interface{}{}) fake.displayOKMutex.Unlock() - if fake.DisplayOKStub != nil { + if stub != nil { fake.DisplayOKStub() } } @@ -899,15 +922,16 @@ func (fake *FakeUI) DisplayOptionalTextPrompt(arg1 string, arg2 string, arg3 ... arg2 string arg3 []map[string]interface{} }{arg1, arg2, arg3}) + stub := fake.DisplayOptionalTextPromptStub + fakeReturns := fake.displayOptionalTextPromptReturns fake.recordInvocation("DisplayOptionalTextPrompt", []interface{}{arg1, arg2, arg3}) fake.displayOptionalTextPromptMutex.Unlock() - if fake.DisplayOptionalTextPromptStub != nil { - return fake.DisplayOptionalTextPromptStub(arg1, arg2, arg3...) + if stub != nil { + return stub(arg1, arg2, arg3...) } if specificReturn { return ret.result1, ret.result2 } - fakeReturns := fake.displayOptionalTextPromptReturns return fakeReturns.result1, fakeReturns.result2 } @@ -963,15 +987,16 @@ func (fake *FakeUI) DisplayPasswordPrompt(arg1 string, arg2 ...map[string]interf arg1 string arg2 []map[string]interface{} }{arg1, arg2}) + stub := fake.DisplayPasswordPromptStub + fakeReturns := fake.displayPasswordPromptReturns fake.recordInvocation("DisplayPasswordPrompt", []interface{}{arg1, arg2}) fake.displayPasswordPromptMutex.Unlock() - if fake.DisplayPasswordPromptStub != nil { - return fake.DisplayPasswordPromptStub(arg1, arg2...) + if stub != nil { + return stub(arg1, arg2...) } if specificReturn { return ret.result1, ret.result2 } - fakeReturns := fake.displayPasswordPromptReturns return fakeReturns.result1, fakeReturns.result2 } @@ -1032,9 +1057,10 @@ func (fake *FakeUI) DisplayTableWithHeader(arg1 string, arg2 [][]string, arg3 in arg2 [][]string arg3 int }{arg1, arg2Copy, arg3}) + stub := fake.DisplayTableWithHeaderStub fake.recordInvocation("DisplayTableWithHeader", []interface{}{arg1, arg2Copy, arg3}) fake.displayTableWithHeaderMutex.Unlock() - if fake.DisplayTableWithHeaderStub != nil { + if stub != nil { fake.DisplayTableWithHeaderStub(arg1, arg2, arg3) } } @@ -1064,9 +1090,10 @@ func (fake *FakeUI) DisplayText(arg1 string, arg2 ...map[string]interface{}) { arg1 string arg2 []map[string]interface{} }{arg1, arg2}) + stub := fake.DisplayTextStub fake.recordInvocation("DisplayText", []interface{}{arg1, arg2}) fake.displayTextMutex.Unlock() - if fake.DisplayTextStub != nil { + if stub != nil { fake.DisplayTextStub(arg1, arg2...) } } @@ -1103,15 +1130,16 @@ func (fake *FakeUI) DisplayTextMenu(arg1 []string, arg2 string, arg3 ...map[stri arg2 string arg3 []map[string]interface{} }{arg1Copy, arg2, arg3}) + stub := fake.DisplayTextMenuStub + fakeReturns := fake.displayTextMenuReturns fake.recordInvocation("DisplayTextMenu", []interface{}{arg1Copy, arg2, arg3}) fake.displayTextMenuMutex.Unlock() - if fake.DisplayTextMenuStub != nil { - return fake.DisplayTextMenuStub(arg1, arg2, arg3...) + if stub != nil { + return stub(arg1, arg2, arg3...) } if specificReturn { return ret.result1, ret.result2 } - fakeReturns := fake.displayTextMenuReturns return fakeReturns.result1, fakeReturns.result2 } @@ -1167,15 +1195,16 @@ func (fake *FakeUI) DisplayTextPrompt(arg1 string, arg2 ...map[string]interface{ arg1 string arg2 []map[string]interface{} }{arg1, arg2}) + stub := fake.DisplayTextPromptStub + fakeReturns := fake.displayTextPromptReturns fake.recordInvocation("DisplayTextPrompt", []interface{}{arg1, arg2}) fake.displayTextPromptMutex.Unlock() - if fake.DisplayTextPromptStub != nil { - return fake.DisplayTextPromptStub(arg1, arg2...) + if stub != nil { + return stub(arg1, arg2...) } if specificReturn { return ret.result1, ret.result2 } - fakeReturns := fake.displayTextPromptReturns return fakeReturns.result1, fakeReturns.result2 } @@ -1230,9 +1259,10 @@ func (fake *FakeUI) DisplayTextWithBold(arg1 string, arg2 ...map[string]interfac arg1 string arg2 []map[string]interface{} }{arg1, arg2}) + stub := fake.DisplayTextWithBoldStub fake.recordInvocation("DisplayTextWithBold", []interface{}{arg1, arg2}) fake.displayTextWithBoldMutex.Unlock() - if fake.DisplayTextWithBoldStub != nil { + if stub != nil { fake.DisplayTextWithBoldStub(arg1, arg2...) } } @@ -1262,9 +1292,10 @@ func (fake *FakeUI) DisplayTextWithFlavor(arg1 string, arg2 ...map[string]interf arg1 string arg2 []map[string]interface{} }{arg1, arg2}) + stub := fake.DisplayTextWithFlavorStub fake.recordInvocation("DisplayTextWithFlavor", []interface{}{arg1, arg2}) fake.displayTextWithFlavorMutex.Unlock() - if fake.DisplayTextWithFlavorStub != nil { + if stub != nil { fake.DisplayTextWithFlavorStub(arg1, arg2...) } } @@ -1294,9 +1325,10 @@ func (fake *FakeUI) DisplayWarning(arg1 string, arg2 ...map[string]interface{}) arg1 string arg2 []map[string]interface{} }{arg1, arg2}) + stub := fake.DisplayWarningStub fake.recordInvocation("DisplayWarning", []interface{}{arg1, arg2}) fake.displayWarningMutex.Unlock() - if fake.DisplayWarningStub != nil { + if stub != nil { fake.DisplayWarningStub(arg1, arg2...) } } @@ -1330,9 +1362,10 @@ func (fake *FakeUI) DisplayWarnings(arg1 []string) { fake.displayWarningsArgsForCall = append(fake.displayWarningsArgsForCall, struct { arg1 []string }{arg1Copy}) + stub := fake.DisplayWarningsStub fake.recordInvocation("DisplayWarnings", []interface{}{arg1Copy}) fake.displayWarningsMutex.Unlock() - if fake.DisplayWarningsStub != nil { + if stub != nil { fake.DisplayWarningsStub(arg1) } } @@ -1361,15 +1394,16 @@ func (fake *FakeUI) GetErr() io.Writer { ret, specificReturn := fake.getErrReturnsOnCall[len(fake.getErrArgsForCall)] fake.getErrArgsForCall = append(fake.getErrArgsForCall, struct { }{}) + stub := fake.GetErrStub + fakeReturns := fake.getErrReturns fake.recordInvocation("GetErr", []interface{}{}) fake.getErrMutex.Unlock() - if fake.GetErrStub != nil { - return fake.GetErrStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.getErrReturns return fakeReturns.result1 } @@ -1413,15 +1447,16 @@ func (fake *FakeUI) GetIn() io.Reader { ret, specificReturn := fake.getInReturnsOnCall[len(fake.getInArgsForCall)] fake.getInArgsForCall = append(fake.getInArgsForCall, struct { }{}) + stub := fake.GetInStub + fakeReturns := fake.getInReturns fake.recordInvocation("GetIn", []interface{}{}) fake.getInMutex.Unlock() - if fake.GetInStub != nil { - return fake.GetInStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.getInReturns return fakeReturns.result1 } @@ -1465,15 +1500,16 @@ func (fake *FakeUI) GetOut() io.Writer { ret, specificReturn := fake.getOutReturnsOnCall[len(fake.getOutArgsForCall)] fake.getOutArgsForCall = append(fake.getOutArgsForCall, struct { }{}) + stub := fake.GetOutStub + fakeReturns := fake.getOutReturns fake.recordInvocation("GetOut", []interface{}{}) fake.getOutMutex.Unlock() - if fake.GetOutStub != nil { - return fake.GetOutStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.getOutReturns return fakeReturns.result1 } @@ -1523,15 +1559,16 @@ func (fake *FakeUI) RequestLoggerFileWriter(arg1 []string) *ui.RequestLoggerFile fake.requestLoggerFileWriterArgsForCall = append(fake.requestLoggerFileWriterArgsForCall, struct { arg1 []string }{arg1Copy}) + stub := fake.RequestLoggerFileWriterStub + fakeReturns := fake.requestLoggerFileWriterReturns fake.recordInvocation("RequestLoggerFileWriter", []interface{}{arg1Copy}) fake.requestLoggerFileWriterMutex.Unlock() - if fake.RequestLoggerFileWriterStub != nil { - return fake.RequestLoggerFileWriterStub(arg1) + if stub != nil { + return stub(arg1) } if specificReturn { return ret.result1 } - fakeReturns := fake.requestLoggerFileWriterReturns return fakeReturns.result1 } @@ -1582,15 +1619,16 @@ func (fake *FakeUI) RequestLoggerTerminalDisplay() *ui.RequestLoggerTerminalDisp ret, specificReturn := fake.requestLoggerTerminalDisplayReturnsOnCall[len(fake.requestLoggerTerminalDisplayArgsForCall)] fake.requestLoggerTerminalDisplayArgsForCall = append(fake.requestLoggerTerminalDisplayArgsForCall, struct { }{}) + stub := fake.RequestLoggerTerminalDisplayStub + fakeReturns := fake.requestLoggerTerminalDisplayReturns fake.recordInvocation("RequestLoggerTerminalDisplay", []interface{}{}) fake.requestLoggerTerminalDisplayMutex.Unlock() - if fake.RequestLoggerTerminalDisplayStub != nil { - return fake.RequestLoggerTerminalDisplayStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.requestLoggerTerminalDisplayReturns return fakeReturns.result1 } @@ -1636,15 +1674,16 @@ func (fake *FakeUI) TranslateText(arg1 string, arg2 ...map[string]interface{}) s arg1 string arg2 []map[string]interface{} }{arg1, arg2}) + stub := fake.TranslateTextStub + fakeReturns := fake.translateTextReturns fake.recordInvocation("TranslateText", []interface{}{arg1, arg2}) fake.translateTextMutex.Unlock() - if fake.TranslateTextStub != nil { - return fake.TranslateTextStub(arg1, arg2...) + if stub != nil { + return stub(arg1, arg2...) } if specificReturn { return ret.result1 } - fakeReturns := fake.translateTextReturns return fakeReturns.result1 } @@ -1696,15 +1735,16 @@ func (fake *FakeUI) UserFriendlyDate(arg1 time.Time) string { fake.userFriendlyDateArgsForCall = append(fake.userFriendlyDateArgsForCall, struct { arg1 time.Time }{arg1}) + stub := fake.UserFriendlyDateStub + fakeReturns := fake.userFriendlyDateReturns fake.recordInvocation("UserFriendlyDate", []interface{}{arg1}) fake.userFriendlyDateMutex.Unlock() - if fake.UserFriendlyDateStub != nil { - return fake.UserFriendlyDateStub(arg1) + if stub != nil { + return stub(arg1) } if specificReturn { return ret.result1 } - fakeReturns := fake.userFriendlyDateReturns return fakeReturns.result1 } @@ -1755,15 +1795,16 @@ func (fake *FakeUI) Writer() io.Writer { ret, specificReturn := fake.writerReturnsOnCall[len(fake.writerArgsForCall)] fake.writerArgsForCall = append(fake.writerArgsForCall, struct { }{}) + stub := fake.WriterStub + fakeReturns := fake.writerReturns fake.recordInvocation("Writer", []interface{}{}) fake.writerMutex.Unlock() - if fake.WriterStub != nil { - return fake.WriterStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.writerReturns return fakeReturns.result1 } diff --git a/command/ui.go b/command/ui.go index 51eb7a35be2..dd997f96436 100644 --- a/command/ui.go +++ b/command/ui.go @@ -14,9 +14,9 @@ type UI interface { DisplayBoolPrompt(defaultResponse bool, template string, templateValues ...map[string]interface{}) (bool, error) DisplayChangesForPush(changeSet []ui.Change) error DisplayDeprecationWarning() - DisplayDiffAddition(line string, depth int) - DisplayDiffRemoval(line string, depth int) - DisplayDiffUnchanged(line string, depth int) + DisplayDiffAddition(line string, depth int, addHyphen bool) + DisplayDiffRemoval(line string, depth int, addHyphen bool) + DisplayDiffUnchanged(line string, depth int, addHyphen bool) DisplayError(err error) DisplayFileDeprecationWarning() DisplayHeader(text string) diff --git a/command/v7/shared/manifest_diff_displayer.go b/command/v7/shared/manifest_diff_displayer.go index 41591b2d6bd..4a9038e53a8 100644 --- a/command/v7/shared/manifest_diff_displayer.go +++ b/command/v7/shared/manifest_diff_displayer.go @@ -25,7 +25,7 @@ func NewManifestDiffDisplayer(ui command.UI) *ManifestDiffDisplayer { func (display *ManifestDiffDisplayer) DisplayDiff(rawManifest []byte, diff resources.ManifestDiff) error { // If there are no diffs, just print the manifest if len(diff.Diffs) == 0 { - display.UI.DisplayDiffUnchanged(string(rawManifest), 0) + display.UI.DisplayDiffUnchanged(string(rawManifest), 0, false) return nil } @@ -51,11 +51,11 @@ func (display *ManifestDiffDisplayer) DisplayDiff(rawManifest []byte, diff resou } // Always display the yaml header line - display.UI.DisplayDiffUnchanged("---", 0) + display.UI.DisplayDiffUnchanged("---", 0, false) // For each entry in the provided manifest, process any diffs at or below that entry for _, entry := range yamlManifest { - display.processDiffsRecursively("/"+interfaceToString(entry.Key), entry.Value, 0, &pathAddReplaceMap, &pathRemoveMap) + display.processDiffsRecursively("/"+interfaceToString(entry.Key), entry.Value, 0, &pathAddReplaceMap, &pathRemoveMap, false) } return nil @@ -66,32 +66,34 @@ func (display *ManifestDiffDisplayer) processDiffsRecursively( value interface{}, depth int, pathAddReplaceMap, pathRemoveMap *map[string]resources.Diff, + addHyphen bool, ) { - field := path.Base(currentManifestPath) + field := path.Base(currentManifestPath) // If there is a diff at the current path, print it if diff, ok := diffExistsAtTheCurrentPath(currentManifestPath, pathAddReplaceMap); ok { - display.formatDiff(field, diff, depth) + display.formatDiff(field, diff, depth, addHyphen) return } - // If the value is a slice type (i.e. a yaml.MapSlice or a slice), recurse into it if isSliceType(value) { - if isInt(field) { - // Do not print the numeric values in the diffs/paths used to indicate array position, i.e. /applications/0/env - display.UI.DisplayDiffUnchanged("-", depth) - } else { - display.UI.DisplayDiffUnchanged(field+":", depth) + addHyphen = isInt(field) + if !isInt(field) { + display.UI.DisplayDiffUnchanged(field+":", depth, addHyphen) + depth += 1 } if mapSlice, ok := value.(yaml.MapSlice); ok { // If a map, recursively process each entry - for _, entry := range mapSlice { + for i, entry := range mapSlice { + if i > 0 { + addHyphen = false + } display.processDiffsRecursively( currentManifestPath+"/"+interfaceToString(entry.Key), entry.Value, - depth+1, - pathAddReplaceMap, pathRemoveMap, + depth, + pathAddReplaceMap, pathRemoveMap, addHyphen, ) } } else if asSlice, ok := value.([]interface{}); ok { @@ -100,35 +102,36 @@ func (display *ManifestDiffDisplayer) processDiffsRecursively( display.processDiffsRecursively( currentManifestPath+"/"+strconv.Itoa(index), sliceValue, - depth+1, - pathAddReplaceMap, pathRemoveMap, + depth, + pathAddReplaceMap, pathRemoveMap, false, ) } } // Print add/remove diffs after printing the rest of the map or slice if diff, ok := diffExistsAtTheCurrentPath(currentManifestPath, pathRemoveMap); ok { - display.formatDiff(path.Base(diff.Path), diff, depth+1) + display.formatDiff(path.Base(diff.Path), diff, depth, addHyphen) } return } // Otherwise, print the unchanged field and value - display.UI.DisplayDiffUnchanged(formatKeyValue(field, value), depth) + display.UI.DisplayDiffUnchanged(formatKeyValue(field, value), depth, addHyphen) } -func (display *ManifestDiffDisplayer) formatDiff(field string, diff resources.Diff, depth int) { +func (display *ManifestDiffDisplayer) formatDiff(field string, diff resources.Diff, depth int, addHyphen bool) { + addHyphen = isInt(field) || addHyphen switch diff.Op { case resources.AddOperation: - display.UI.DisplayDiffAddition(formatKeyValue(field, diff.Value), depth) + display.UI.DisplayDiffAddition(formatKeyValue(field, diff.Value), depth, addHyphen) case resources.ReplaceOperation: - display.UI.DisplayDiffRemoval(formatKeyValue(field, diff.Was), depth) - display.UI.DisplayDiffAddition(formatKeyValue(field, diff.Value), depth) + display.UI.DisplayDiffRemoval(formatKeyValue(field, diff.Was), depth, addHyphen) + display.UI.DisplayDiffAddition(formatKeyValue(field, diff.Value), depth, addHyphen) case resources.RemoveOperation: - display.UI.DisplayDiffRemoval(formatKeyValue(field, diff.Was), depth) + display.UI.DisplayDiffRemoval(formatKeyValue(field, diff.Was), depth, addHyphen) } } @@ -139,13 +142,14 @@ func diffExistsAtTheCurrentPath(currentManifestPath string, pathDiffMap *map[str func formatKeyValue(key string, value interface{}) string { if isInt(key) { - return "-\n" + indentOneLevelDeeper(interfaceToString(value)) + return interfaceToString(value) } - - if isMapType(value) || isSliceType(value) { + if isSliceType(value) { + return key + ":\n" + interfaceToString(value) + } + if isMapType(value) { return key + ":\n" + indentOneLevelDeeper(interfaceToString(value)) } - return key + ": " + interfaceToString(value) } diff --git a/command/v7/shared/manifest_diff_displayer_test.go b/command/v7/shared/manifest_diff_displayer_test.go index 9e25d18f2d8..39cefa404aa 100644 --- a/command/v7/shared/manifest_diff_displayer_test.go +++ b/command/v7/shared/manifest_diff_displayer_test.go @@ -148,13 +148,12 @@ applications: }) It("outputs a diff indicating addition for a single line", func() { - Expect(testUI.Out).To(Say(`--- + Expect(testUI.Out).To(Say(` --- applications: - - - name: dora - env: - a: b -\+ r: m`)) + - name: dora + env: + a: b +\+ r: m`)) }) }) @@ -178,12 +177,11 @@ applications: }) It("outputs a diff indicating addition of a map type", func() { - Expect(testUI.Out).To(Say(`--- + Expect(testUI.Out).To(Say(` --- applications: -\+ - -\+ env: -\+ a: b -\+ name: dora`)) +\+ - env: +\+ a: b +\+ name: dora`)) }) }) @@ -204,12 +202,11 @@ applications: }) It("outputs a diff indicating addition of a map type", func() { - Expect(testUI.Out).To(Say(`--- + Expect(testUI.Out).To(Say(` --- applications: - - - name: dora -\+ env: -\+ a: b`)) + - name: dora +\+ env: +\+ a: b`)) }) }) @@ -243,15 +240,14 @@ applications: When("each element of the array is a map value", func() { It("outputs a diff indicating addition for each map type", func() { - Expect(testUI.Out).To(Say(`--- + Expect(testUI.Out).To(Say(` --- applications: - - - name: dora - env: - r: m -\+ routes: -\+ - route: route1.cli.fun -\+ - route: route2.cli.fun`)) + - name: dora + env: + r: m +\+ routes: +\+ - route: route1.cli.fun +\+ - route: route2.cli.fun`)) }) }) }) @@ -271,13 +267,12 @@ applications: }) It("outputs correctly formatted diff with key removed", func() { - Expect(testUI.Out).To(Say(`--- + Expect(testUI.Out).To(Say(` --- applications: - - - name: dora - env: - r: m -- a: b`)) + - name: dora + env: + r: m +- a: b`)) }) }) @@ -299,12 +294,11 @@ applications: It("outputs correctly formatted diff", func() { Expect(testUI.Out).To(Say(`--- applications: - - - name: dora - env: -- a: b -\+ a: c - r: m + - name: dora + env: +- a: b +\+ a: c + r: m `)) }) }) diff --git a/integration/v7/isolated/scale_command_test.go b/integration/v7/isolated/scale_command_test.go index 4ef458723c7..e984f4d8c0e 100644 --- a/integration/v7/isolated/scale_command_test.go +++ b/integration/v7/isolated/scale_command_test.go @@ -349,7 +349,7 @@ var _ = Describe("scale command", func() { appTable := helpers.ParseV3AppProcessTable(session.Out.Contents()) instanceSummary := appTable.Processes[0].Instances[0] - currentInstances = string(len(appTable.Processes[0].Instances)) + currentInstances = fmt.Sprint(len(appTable.Processes[0].Instances)) maxMemory = strings.Fields(instanceSummary.Memory)[2] maxDiskSize = strings.Fields(instanceSummary.Disk)[2] }) diff --git a/util/ui/ui.go b/util/ui/ui.go index 7a037b7451d..9643bac6683 100644 --- a/util/ui/ui.go +++ b/util/ui/ui.go @@ -274,18 +274,32 @@ func (ui *UI) DisplayTextWithFlavor(template string, templateValues ...map[strin fmt.Fprintf(ui.Out, "%s\n", ui.TranslateText(template, firstTemplateValues)) } +func getIndent(depth int, addHyphen bool) string { + if depth == 0 { + return "" + } + indent := strings.Repeat(" ", depth-1) + if addHyphen { + return indent + "- " + } else { + return indent + " " + } +} + // DisplayDiffAddition displays added lines in a diff, colored green and prefixed with '+' -func (ui *UI) DisplayDiffAddition(lines string, depth int) { +func (ui *UI) DisplayDiffAddition(lines string, depth int, addHyphen bool) { ui.terminalLock.Lock() defer ui.terminalLock.Unlock() - indent := strings.Repeat(" ", depth) + indent := getIndent(depth, addHyphen) - for _, line := range strings.Split(lines, "\n") { + for i, line := range strings.Split(lines, "\n") { if line == "" { continue } - + if i > 0 { + indent = getIndent(depth, false) + } template := "+ " + indent + line formatted := ui.modifyColor(template, color.New(color.FgGreen)) @@ -294,17 +308,19 @@ func (ui *UI) DisplayDiffAddition(lines string, depth int) { } // DisplayDiffRemoval displays removed lines in a diff, colored red and prefixed with '-' -func (ui *UI) DisplayDiffRemoval(lines string, depth int) { +func (ui *UI) DisplayDiffRemoval(lines string, depth int, addHyphen bool) { ui.terminalLock.Lock() defer ui.terminalLock.Unlock() - indent := strings.Repeat(" ", depth) + indent := getIndent(depth, addHyphen) - for _, line := range strings.Split(lines, "\n") { + for i, line := range strings.Split(lines, "\n") { if line == "" { continue } - + if i > 0 { + indent = getIndent(depth, false) + } template := "- " + indent + line formatted := ui.modifyColor(template, color.New(color.FgRed)) @@ -313,17 +329,19 @@ func (ui *UI) DisplayDiffRemoval(lines string, depth int) { } // DisplayDiffUnchanged displays unchanged lines in a diff, with no color or prefix -func (ui *UI) DisplayDiffUnchanged(lines string, depth int) { +func (ui *UI) DisplayDiffUnchanged(lines string, depth int, addHyphen bool) { ui.terminalLock.Lock() defer ui.terminalLock.Unlock() - indent := strings.Repeat(" ", depth) + indent := getIndent(depth, addHyphen) - for _, line := range strings.Split(lines, "\n") { + for i, line := range strings.Split(lines, "\n") { if line == "" { continue } - + if i > 0 { + indent = getIndent(depth, false) + } template := " " + indent + line fmt.Fprintf(ui.Out, "%s\n", template) diff --git a/util/ui/ui_test.go b/util/ui/ui_test.go index 693cba3327b..bb703b4ac54 100644 --- a/util/ui/ui_test.go +++ b/util/ui/ui_test.go @@ -332,23 +332,36 @@ var _ = Describe("UI", func() { Describe("DisplayDiffAddition", func() { It("displays a green indented line with a +", func() { - ui.DisplayDiffAddition("added", 3) + ui.DisplayDiffAddition("added", 3, false) Expect(out).To(Say(`\x1b\[32m\+ added\x1b\[0m`)) }) + It("displays a hyphen when the addHyphen is true", func() { + ui.DisplayDiffAddition("added", 3, true) + Expect(out).To(Say(`\x1b\[32m\+ - added\x1b\[0m`)) + }) + }) Describe("DisplayDiffRemoval", func() { It("displays a red indented line with a -", func() { - ui.DisplayDiffRemoval("removed", 3) + ui.DisplayDiffRemoval("removed", 3, false) Expect(out).To(Say(`\x1b\[31m\- removed\x1b\[0m`)) }) + It("displays a a hyphen when addHyphen is true", func() { + ui.DisplayDiffRemoval("removed", 3, true) + Expect(out).To(Say(`\x1b\[31m\- - removed\x1b\[0m`)) + }) }) Describe("DisplayDiffUnchanged", func() { It("displays a plain indented line with no prefix", func() { - ui.DisplayDiffUnchanged("unchanged", 3) + ui.DisplayDiffUnchanged("unchanged", 3, false) Expect(out).To(Say(" unchanged")) }) + It("displays a a hyphen when addHyphen is true", func() { + ui.DisplayDiffUnchanged("unchanged", 3, true) + Expect(out).To(Say(" - unchanged")) + }) }) Describe("TranslateText", func() { diff --git a/util/ui/uifakes/fake_config.go b/util/ui/uifakes/fake_config.go index 5655557c2c2..a4cacace19d 100644 --- a/util/ui/uifakes/fake_config.go +++ b/util/ui/uifakes/fake_config.go @@ -58,15 +58,16 @@ func (fake *FakeConfig) ColorEnabled() configv3.ColorSetting { ret, specificReturn := fake.colorEnabledReturnsOnCall[len(fake.colorEnabledArgsForCall)] fake.colorEnabledArgsForCall = append(fake.colorEnabledArgsForCall, struct { }{}) + stub := fake.ColorEnabledStub + fakeReturns := fake.colorEnabledReturns fake.recordInvocation("ColorEnabled", []interface{}{}) fake.colorEnabledMutex.Unlock() - if fake.ColorEnabledStub != nil { - return fake.ColorEnabledStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.colorEnabledReturns return fakeReturns.result1 } @@ -110,15 +111,16 @@ func (fake *FakeConfig) IsTTY() bool { ret, specificReturn := fake.isTTYReturnsOnCall[len(fake.isTTYArgsForCall)] fake.isTTYArgsForCall = append(fake.isTTYArgsForCall, struct { }{}) + stub := fake.IsTTYStub + fakeReturns := fake.isTTYReturns fake.recordInvocation("IsTTY", []interface{}{}) fake.isTTYMutex.Unlock() - if fake.IsTTYStub != nil { - return fake.IsTTYStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.isTTYReturns return fakeReturns.result1 } @@ -162,15 +164,16 @@ func (fake *FakeConfig) Locale() string { ret, specificReturn := fake.localeReturnsOnCall[len(fake.localeArgsForCall)] fake.localeArgsForCall = append(fake.localeArgsForCall, struct { }{}) + stub := fake.LocaleStub + fakeReturns := fake.localeReturns fake.recordInvocation("Locale", []interface{}{}) fake.localeMutex.Unlock() - if fake.LocaleStub != nil { - return fake.LocaleStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.localeReturns return fakeReturns.result1 } @@ -214,15 +217,16 @@ func (fake *FakeConfig) TerminalWidth() int { ret, specificReturn := fake.terminalWidthReturnsOnCall[len(fake.terminalWidthArgsForCall)] fake.terminalWidthArgsForCall = append(fake.terminalWidthArgsForCall, struct { }{}) + stub := fake.TerminalWidthStub + fakeReturns := fake.terminalWidthReturns fake.recordInvocation("TerminalWidth", []interface{}{}) fake.terminalWidthMutex.Unlock() - if fake.TerminalWidthStub != nil { - return fake.TerminalWidthStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.terminalWidthReturns return fakeReturns.result1 } diff --git a/util/ui/uifakes/fake_exiter.go b/util/ui/uifakes/fake_exiter.go index 378af6b6419..ce8d58b6e46 100644 --- a/util/ui/uifakes/fake_exiter.go +++ b/util/ui/uifakes/fake_exiter.go @@ -22,9 +22,10 @@ func (fake *FakeExiter) Exit(arg1 int) { fake.exitArgsForCall = append(fake.exitArgsForCall, struct { arg1 int }{arg1}) + stub := fake.ExitStub fake.recordInvocation("Exit", []interface{}{arg1}) fake.exitMutex.Unlock() - if fake.ExitStub != nil { + if stub != nil { fake.ExitStub(arg1) } } diff --git a/util/ui/uifakes/fake_interactor.go b/util/ui/uifakes/fake_interactor.go index 3f2d8ca5e34..55cc9a8a9c4 100644 --- a/util/ui/uifakes/fake_interactor.go +++ b/util/ui/uifakes/fake_interactor.go @@ -32,15 +32,16 @@ func (fake *FakeInteractor) NewInteraction(arg1 string, arg2 ...interact.Choice) arg1 string arg2 []interact.Choice }{arg1, arg2}) + stub := fake.NewInteractionStub + fakeReturns := fake.newInteractionReturns fake.recordInvocation("NewInteraction", []interface{}{arg1, arg2}) fake.newInteractionMutex.Unlock() - if fake.NewInteractionStub != nil { - return fake.NewInteractionStub(arg1, arg2...) + if stub != nil { + return stub(arg1, arg2...) } if specificReturn { return ret.result1 } - fakeReturns := fake.newInteractionReturns return fakeReturns.result1 } diff --git a/util/ui/uifakes/fake_log_message.go b/util/ui/uifakes/fake_log_message.go index 6bd60bc2bd9..ec1f175288d 100644 --- a/util/ui/uifakes/fake_log_message.go +++ b/util/ui/uifakes/fake_log_message.go @@ -68,15 +68,16 @@ func (fake *FakeLogMessage) Message() string { ret, specificReturn := fake.messageReturnsOnCall[len(fake.messageArgsForCall)] fake.messageArgsForCall = append(fake.messageArgsForCall, struct { }{}) + stub := fake.MessageStub + fakeReturns := fake.messageReturns fake.recordInvocation("Message", []interface{}{}) fake.messageMutex.Unlock() - if fake.MessageStub != nil { - return fake.MessageStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.messageReturns return fakeReturns.result1 } @@ -120,15 +121,16 @@ func (fake *FakeLogMessage) SourceInstance() string { ret, specificReturn := fake.sourceInstanceReturnsOnCall[len(fake.sourceInstanceArgsForCall)] fake.sourceInstanceArgsForCall = append(fake.sourceInstanceArgsForCall, struct { }{}) + stub := fake.SourceInstanceStub + fakeReturns := fake.sourceInstanceReturns fake.recordInvocation("SourceInstance", []interface{}{}) fake.sourceInstanceMutex.Unlock() - if fake.SourceInstanceStub != nil { - return fake.SourceInstanceStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.sourceInstanceReturns return fakeReturns.result1 } @@ -172,15 +174,16 @@ func (fake *FakeLogMessage) SourceType() string { ret, specificReturn := fake.sourceTypeReturnsOnCall[len(fake.sourceTypeArgsForCall)] fake.sourceTypeArgsForCall = append(fake.sourceTypeArgsForCall, struct { }{}) + stub := fake.SourceTypeStub + fakeReturns := fake.sourceTypeReturns fake.recordInvocation("SourceType", []interface{}{}) fake.sourceTypeMutex.Unlock() - if fake.SourceTypeStub != nil { - return fake.SourceTypeStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.sourceTypeReturns return fakeReturns.result1 } @@ -224,15 +227,16 @@ func (fake *FakeLogMessage) Timestamp() time.Time { ret, specificReturn := fake.timestampReturnsOnCall[len(fake.timestampArgsForCall)] fake.timestampArgsForCall = append(fake.timestampArgsForCall, struct { }{}) + stub := fake.TimestampStub + fakeReturns := fake.timestampReturns fake.recordInvocation("Timestamp", []interface{}{}) fake.timestampMutex.Unlock() - if fake.TimestampStub != nil { - return fake.TimestampStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.timestampReturns return fakeReturns.result1 } @@ -276,15 +280,16 @@ func (fake *FakeLogMessage) Type() string { ret, specificReturn := fake.typeReturnsOnCall[len(fake.typeArgsForCall)] fake.typeArgsForCall = append(fake.typeArgsForCall, struct { }{}) + stub := fake.TypeStub + fakeReturns := fake.typeReturns fake.recordInvocation("Type", []interface{}{}) fake.typeMutex.Unlock() - if fake.TypeStub != nil { - return fake.TypeStub() + if stub != nil { + return stub() } if specificReturn { return ret.result1 } - fakeReturns := fake.typeReturns return fakeReturns.result1 } diff --git a/util/ui/uifakes/fake_resolver.go b/util/ui/uifakes/fake_resolver.go index 9285aeff036..0bd677edbf7 100644 --- a/util/ui/uifakes/fake_resolver.go +++ b/util/ui/uifakes/fake_resolver.go @@ -40,15 +40,16 @@ func (fake *FakeResolver) Resolve(arg1 interface{}) error { fake.resolveArgsForCall = append(fake.resolveArgsForCall, struct { arg1 interface{} }{arg1}) + stub := fake.ResolveStub + fakeReturns := fake.resolveReturns fake.recordInvocation("Resolve", []interface{}{arg1}) fake.resolveMutex.Unlock() - if fake.ResolveStub != nil { - return fake.ResolveStub(arg1) + if stub != nil { + return stub(arg1) } if specificReturn { return ret.result1 } - fakeReturns := fake.resolveReturns return fakeReturns.result1 } @@ -99,9 +100,10 @@ func (fake *FakeResolver) SetIn(arg1 io.Reader) { fake.setInArgsForCall = append(fake.setInArgsForCall, struct { arg1 io.Reader }{arg1}) + stub := fake.SetInStub fake.recordInvocation("SetIn", []interface{}{arg1}) fake.setInMutex.Unlock() - if fake.SetInStub != nil { + if stub != nil { fake.SetInStub(arg1) } } @@ -130,9 +132,10 @@ func (fake *FakeResolver) SetOut(arg1 io.Writer) { fake.setOutArgsForCall = append(fake.setOutArgsForCall, struct { arg1 io.Writer }{arg1}) + stub := fake.SetOutStub fake.recordInvocation("SetOut", []interface{}{arg1}) fake.setOutMutex.Unlock() - if fake.SetOutStub != nil { + if stub != nil { fake.SetOutStub(arg1) } } diff --git a/vendor/modules.txt b/vendor/modules.txt index c0f8d25c8f3..932bf6834da 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,19 +1,25 @@ # code.cloudfoundry.org/bytefmt v0.0.0-20170428003108-f4415fafc561 +## explicit code.cloudfoundry.org/bytefmt # code.cloudfoundry.org/cfnetworking-cli-api v0.0.0-20190103195135-4b04f26287a6 +## explicit code.cloudfoundry.org/cfnetworking-cli-api/cfnetworking code.cloudfoundry.org/cfnetworking-cli-api/cfnetworking/cfnetv1 code.cloudfoundry.org/cfnetworking-cli-api/cfnetworking/cfnetv1/internal code.cloudfoundry.org/cfnetworking-cli-api/cfnetworking/networkerror code.cloudfoundry.org/cfnetworking-cli-api/cfnetworking/wrapper # code.cloudfoundry.org/cli-plugin-repo v0.0.0-20200304195157-af98c4be9b85 +## explicit code.cloudfoundry.org/cli-plugin-repo/web # code.cloudfoundry.org/cli/integration/assets/hydrabroker v0.0.0-20201002233634-81722a1144e4 +## explicit code.cloudfoundry.org/cli/integration/assets/hydrabroker/config # code.cloudfoundry.org/clock v1.0.0 +## explicit code.cloudfoundry.org/clock code.cloudfoundry.org/clock/fakeclock # code.cloudfoundry.org/diego-ssh v0.0.0-20170109142818-18cdb3586e7f +## explicit code.cloudfoundry.org/diego-ssh/server code.cloudfoundry.org/diego-ssh/server/fakes code.cloudfoundry.org/diego-ssh/test_helpers @@ -21,19 +27,24 @@ code.cloudfoundry.org/diego-ssh/test_helpers/fake_io code.cloudfoundry.org/diego-ssh/test_helpers/fake_net code.cloudfoundry.org/diego-ssh/test_helpers/fake_ssh # code.cloudfoundry.org/go-log-cache v1.0.1-0.20200316170138-f466e0302c34 +## explicit code.cloudfoundry.org/go-log-cache code.cloudfoundry.org/go-log-cache/internal code.cloudfoundry.org/go-log-cache/rpc/logcache_v1 # code.cloudfoundry.org/go-loggregator v7.4.0+incompatible +## explicit code.cloudfoundry.org/go-loggregator/rpc/loggregator_v2 # code.cloudfoundry.org/gofileutils v0.0.0-20170111115228-4d0c80011a0f +## explicit code.cloudfoundry.org/gofileutils/fileutils # code.cloudfoundry.org/jsonry v1.1.2 +## explicit code.cloudfoundry.org/jsonry code.cloudfoundry.org/jsonry/internal/context code.cloudfoundry.org/jsonry/internal/path code.cloudfoundry.org/jsonry/internal/tree # code.cloudfoundry.org/lager v1.1.1-0.20191008172124-a9afc05ee5be +## explicit code.cloudfoundry.org/lager code.cloudfoundry.org/lager/internal/truncate code.cloudfoundry.org/lager/lagerctx @@ -41,52 +52,75 @@ code.cloudfoundry.org/lager/lagertest # code.cloudfoundry.org/rfc5424 v0.0.0-20180905210152-236a6d29298a code.cloudfoundry.org/rfc5424 # code.cloudfoundry.org/tlsconfig v0.0.0-20200131000646-bbe0f8da39b3 +## explicit code.cloudfoundry.org/tlsconfig # code.cloudfoundry.org/ykk v0.0.0-20170424192843-e4df4ce2fd4d +## explicit code.cloudfoundry.org/ykk # github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 +## explicit github.com/Azure/go-ansiterm github.com/Azure/go-ansiterm/winterm # github.com/SermoDigital/jose v0.9.2-0.20161205224733-f6df55f235c2 +## explicit github.com/SermoDigital/jose github.com/SermoDigital/jose/crypto github.com/SermoDigital/jose/jws github.com/SermoDigital/jose/jwt +# github.com/apoydence/eachers v0.0.0-20181020210610-23942921fe77 +## explicit # github.com/blang/semver v3.5.1+incompatible +## explicit github.com/blang/semver # github.com/bmatcuk/doublestar v1.3.1 +## explicit github.com/bmatcuk/doublestar # github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40 github.com/bmizerany/pat # github.com/charlievieth/fs v0.0.0-20170613215519-7dc373669fa1 +## explicit github.com/charlievieth/fs # github.com/cloudfoundry/bosh-cli v5.5.1+incompatible +## explicit github.com/cloudfoundry/bosh-cli/director/template # github.com/cloudfoundry/bosh-utils v0.0.0-20180315210917-c6a922e299b8 +## explicit github.com/cloudfoundry/bosh-utils/errors github.com/cloudfoundry/bosh-utils/logger github.com/cloudfoundry/bosh-utils/system # github.com/cloudfoundry/noaa v2.1.1-0.20190110210640-5ce49363dfa6+incompatible +## explicit github.com/cloudfoundry/noaa github.com/cloudfoundry/noaa/consumer github.com/cloudfoundry/noaa/consumer/internal github.com/cloudfoundry/noaa/errors # github.com/cloudfoundry/sonde-go v0.0.0-20171206171820-b33733203bb4 +## explicit github.com/cloudfoundry/sonde-go/events # github.com/cppforlife/go-patch v0.1.0 +## explicit github.com/cppforlife/go-patch/patch # github.com/cyphar/filepath-securejoin v0.2.1 +## explicit github.com/cyphar/filepath-securejoin # github.com/docker/distribution v2.6.0-rc.1.0.20171109224904-e5b5e44386f7+incompatible +## explicit github.com/docker/distribution/digestset github.com/docker/distribution/reference # github.com/docker/docker v1.4.2-0.20171120205147-9de84a78d76e +## explicit github.com/docker/docker/pkg/term/windows +# github.com/elazarl/goproxy v0.0.0-20200809112317-0581fc3aee2d +## explicit +# github.com/elazarl/goproxy/ext v0.0.0-20200809112317-0581fc3aee2d +## explicit # github.com/fatih/color v1.5.1-0.20170926111411-5df930a27be2 +## explicit github.com/fatih/color # github.com/fsnotify/fsnotify v1.4.9 github.com/fsnotify/fsnotify # github.com/gogo/protobuf v1.3.1 +## explicit github.com/gogo/protobuf/gogoproto github.com/gogo/protobuf/proto github.com/gogo/protobuf/protoc-gen-gogo/descriptor @@ -102,40 +136,52 @@ github.com/golang/protobuf/ptypes/struct github.com/golang/protobuf/ptypes/timestamp github.com/golang/protobuf/ptypes/wrappers # github.com/google/go-querystring v0.0.0-20170111101155-53e6ce116135 +## explicit github.com/google/go-querystring/query # github.com/gorilla/websocket v1.2.1-0.20171201014301-b89020ee79b8 +## explicit github.com/gorilla/websocket # github.com/grpc-ecosystem/grpc-gateway v1.14.0 github.com/grpc-ecosystem/grpc-gateway/internal github.com/grpc-ecosystem/grpc-gateway/runtime github.com/grpc-ecosystem/grpc-gateway/utilities # github.com/jessevdk/go-flags v1.4.1-0.20181221193153-c0795c8afcf4 +## explicit github.com/jessevdk/go-flags # github.com/konsorten/go-windows-terminal-sequences v1.0.1 github.com/konsorten/go-windows-terminal-sequences # github.com/kr/pty v1.1.1 +## explicit github.com/kr/pty # github.com/lunixbochs/vtclean v1.0.0 +## explicit github.com/lunixbochs/vtclean # github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e +## explicit github.com/mailru/easyjson github.com/mailru/easyjson/buffer github.com/mailru/easyjson/jlexer github.com/mailru/easyjson/jwriter # github.com/mattn/go-colorable v0.1.0 +## explicit github.com/mattn/go-colorable # github.com/mattn/go-isatty v0.0.3 +## explicit github.com/mattn/go-isatty # github.com/mattn/go-runewidth v0.0.5-0.20181218000649-703b5e6b11ae +## explicit github.com/mattn/go-runewidth # github.com/maxbrunsfeld/counterfeiter/v6 v6.2.2 +## explicit github.com/maxbrunsfeld/counterfeiter/v6 github.com/maxbrunsfeld/counterfeiter/v6/arguments github.com/maxbrunsfeld/counterfeiter/v6/command github.com/maxbrunsfeld/counterfeiter/v6/generator # github.com/moby/moby v1.4.2-0.20171120205147-9de84a78d76e +## explicit github.com/moby/moby/pkg/term # github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d +## explicit github.com/nu7hatch/gouuid # github.com/nxadm/tail v1.4.4 github.com/nxadm/tail @@ -144,6 +190,7 @@ github.com/nxadm/tail/util github.com/nxadm/tail/watch github.com/nxadm/tail/winfile # github.com/onsi/ginkgo v1.14.1 +## explicit github.com/onsi/ginkgo github.com/onsi/ginkgo/config github.com/onsi/ginkgo/extensions/table @@ -165,6 +212,7 @@ github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty github.com/onsi/ginkgo/types # github.com/onsi/gomega v1.10.2 +## explicit github.com/onsi/gomega github.com/onsi/gomega/format github.com/onsi/gomega/gbytes @@ -183,21 +231,33 @@ github.com/onsi/gomega/matchers/support/goraph/node github.com/onsi/gomega/matchers/support/goraph/util github.com/onsi/gomega/types # github.com/opencontainers/go-digest v1.0.0-rc1 +## explicit github.com/opencontainers/go-digest # github.com/pkg/errors v0.9.1 +## explicit github.com/pkg/errors +# github.com/poy/eachers v0.0.0-20181020210610-23942921fe77 +## explicit # github.com/sabhiram/go-gitignore v0.0.0-20171017070213-362f9845770f +## explicit github.com/sabhiram/go-gitignore # github.com/sajari/fuzzy v1.0.0 +## explicit github.com/sajari/fuzzy # github.com/sirupsen/logrus v1.2.0 +## explicit github.com/sirupsen/logrus +# github.com/tedsuo/ifrit v0.0.0-20191009134036-9a97d0632f00 +## explicit # github.com/tedsuo/rata v1.0.1-0.20170830210128-07d200713958 +## explicit github.com/tedsuo/rata # github.com/vito/go-interact v0.0.0-20171111012221-fa338ed9e9ec +## explicit github.com/vito/go-interact/interact github.com/vito/go-interact/interact/terminal # golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897 +## explicit golang.org/x/crypto/blowfish golang.org/x/crypto/chacha20 golang.org/x/crypto/curve25519 @@ -209,6 +269,7 @@ golang.org/x/crypto/ssh golang.org/x/crypto/ssh/internal/bcrypt_pbkdf golang.org/x/crypto/ssh/terminal # golang.org/x/net v0.0.0-20201021035429-f5854403a974 +## explicit golang.org/x/net/context golang.org/x/net/html golang.org/x/net/html/atom @@ -228,6 +289,7 @@ golang.org/x/sys/internal/unsafeheader golang.org/x/sys/unix golang.org/x/sys/windows # golang.org/x/text v0.3.3 +## explicit golang.org/x/text/encoding golang.org/x/text/encoding/charmap golang.org/x/text/encoding/htmlindex @@ -308,8 +370,13 @@ google.golang.org/grpc/stats google.golang.org/grpc/status google.golang.org/grpc/tap # gopkg.in/cheggaaa/pb.v1 v1.0.27 +## explicit gopkg.in/cheggaaa/pb.v1 # gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 gopkg.in/tomb.v1 # gopkg.in/yaml.v2 v2.3.0 +## explicit gopkg.in/yaml.v2 +# gopkg.in/fsnotify.v1 v1.4.7 => github.com/fsnotify/fsnotify v1.4.7 +# github.com/golang/protobuf => github.com/golang/protobuf v1.3.4 +# golang.org/x/sys => golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6