mirror of
https://github.com/argoproj/argo-cd
synced 2026-05-23 17:28:44 +00:00
Improve build stability (#2247)
This commit is contained in:
parent
75cc094b88
commit
fe90744ea3
2 changed files with 5 additions and 7 deletions
|
|
@ -167,7 +167,7 @@ jobs:
|
|||
name: Lint code
|
||||
# use GOGC to limit memory usage in exchange for CPU usage, https://github.com/golangci/golangci-lint#memory-usage-of-golangci-lint
|
||||
# we have 8GB RAM, 2CPUs https://circleci.com/docs/2.0/executor-types/#using-machine
|
||||
command: LINT_GOGC=20 LINT_CONCURRENCY=1 LINT_DEADLINE=3m0s make lint
|
||||
command: LINT_GOGC=20 LINT_CONCURRENCY=1 LINT_DEADLINE=4m0s make lint
|
||||
- run:
|
||||
name: Check nothing has changed
|
||||
command: |
|
||||
|
|
|
|||
|
|
@ -17,19 +17,19 @@ import (
|
|||
func TestPreSyncHookSuccessful(t *testing.T) {
|
||||
// special-case that the pod remains in the running state, but we don't really care, because this is only used for
|
||||
// determining overall operation status is a sync with >1 wave/phase
|
||||
testHookSuccessful(t, HookTypePreSync, OperationRunning)
|
||||
testHookSuccessful(t, HookTypePreSync)
|
||||
}
|
||||
|
||||
func TestSyncHookSuccessful(t *testing.T) {
|
||||
testHookSuccessful(t, HookTypeSync, OperationSucceeded)
|
||||
testHookSuccessful(t, HookTypeSync)
|
||||
}
|
||||
|
||||
func TestPostSyncHookSuccessful(t *testing.T) {
|
||||
testHookSuccessful(t, HookTypePostSync, OperationSucceeded)
|
||||
testHookSuccessful(t, HookTypePostSync)
|
||||
}
|
||||
|
||||
// make sure we can run a standard sync hook
|
||||
func testHookSuccessful(t *testing.T, hookType HookType, podHookPhase OperationPhase) {
|
||||
func testHookSuccessful(t *testing.T, hookType HookType) {
|
||||
Given(t).
|
||||
Path("hook").
|
||||
When().
|
||||
|
|
@ -41,9 +41,7 @@ func testHookSuccessful(t *testing.T, hookType HookType, podHookPhase OperationP
|
|||
Expect(SyncStatusIs(SyncStatusCodeSynced)).
|
||||
Expect(ResourceSyncStatusIs("Pod", "pod", SyncStatusCodeSynced)).
|
||||
Expect(ResourceHealthIs("Pod", "pod", HealthStatusHealthy)).
|
||||
Expect(Pod(func(p v1.Pod) bool { return p.Name == "hook" })).
|
||||
Expect(ResourceResultNumbering(2)).
|
||||
Expect(ResourceResultIs(ResourceResult{Version: "v1", Kind: "Pod", Namespace: DeploymentNamespace(), Name: "pod", Status: ResultCodeSynced, Message: "pod/pod created", HookPhase: podHookPhase, SyncPhase: SyncPhaseSync})).
|
||||
Expect(ResourceResultIs(ResourceResult{Version: "v1", Kind: "Pod", Namespace: DeploymentNamespace(), Name: "hook", Message: "pod/hook created", HookType: hookType, HookPhase: OperationSucceeded, SyncPhase: SyncPhase(hookType)}))
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue