-
Notifications
You must be signed in to change notification settings - Fork 3
tests: wait for Running in cloud-hypervisor running-fork path #142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
5595c78
d973033
423399b
ffb4e43
fffe995
9bf231f
ecfd653
56cec52
37f30ad
3d9c470
aa78f4f
b2c8e2c
e51f91b
6b8b8a5
1234c12
bad661d
032878c
695abf1
eedd2f9
2148d16
655c284
cf6018f
a449e2c
9462250
777997a
669114f
e34ecd0
7e8436b
3e16495
1c99011
2d4b7c9
68fec3b
192f095
ae39109
c67e45c
32299fc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -380,7 +380,10 @@ func TestForkCloudHypervisorFromRunningNetwork(t *testing.T) { | |
| NetworkEnabled: true, | ||
| }) | ||
| require.NoError(t, err) | ||
| t.Cleanup(func() { _ = manager.DeleteInstance(context.Background(), source.Id) }) | ||
| sourceID := source.Id | ||
| t.Cleanup(func() { _ = manager.DeleteInstance(context.Background(), sourceID) }) | ||
| source, err = waitForInstanceState(ctx, manager, source.Id, StateRunning, 20*time.Second) | ||
| require.NoError(t, err) | ||
| require.NoError(t, waitForVMReady(ctx, source.SocketPath, 5*time.Second)) | ||
|
|
||
| assert.NotEmpty(t, source.IP) | ||
|
|
@@ -399,13 +402,20 @@ func TestForkCloudHypervisorFromRunningNetwork(t *testing.T) { | |
| TargetState: StateRunning, | ||
| }) | ||
| require.NoError(t, err) | ||
| require.Contains(t, []State{StateInitializing, StateRunning}, forked.State) | ||
| forked, err = waitForInstanceState(ctx, manager, forked.Id, StateRunning, 20*time.Second) | ||
| require.NoError(t, err) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Forked instance cleanup registered after potential timeout failureLow Severity The forked instance's Additional Locations (1) |
||
| require.Equal(t, StateRunning, forked.State) | ||
| forkedID := forked.Id | ||
| t.Cleanup(func() { _ = manager.DeleteInstance(context.Background(), forkedID) }) | ||
|
|
||
| // Source should be restored and still reachable by its private IP. | ||
| sourceAfterFork, err := manager.GetInstance(ctx, source.Id) | ||
| require.NoError(t, err) | ||
| if sourceAfterFork.State != StateRunning { | ||
| sourceAfterFork, err = waitForInstanceState(ctx, manager, source.Id, StateRunning, 20*time.Second) | ||
| require.NoError(t, err) | ||
| } | ||
| require.Equal(t, StateRunning, sourceAfterFork.State) | ||
| require.NotEmpty(t, sourceAfterFork.IP) | ||
| assertHostCanReachNginx(t, sourceAfterFork.IP, 80, 60*time.Second) | ||
|
|
||


Uh oh!
There was an error while loading. Please reload this page.