Skip to content
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

Improve the state matching in E2E tests #1571

Open
Wwwsylvia opened this issue Dec 5, 2024 · 0 comments
Open

Improve the state matching in E2E tests #1571

Wwwsylvia opened this issue Dec 5, 2024 · 0 comments
Milestone

Comments

@Wwwsylvia
Copy link
Member

In E2E testing, currently we can only match the top-level command like cp, pull, push, but we are not able to match sub commands like manifest push, manifest fetch, etc. We should improve the status matcher to match the full commands.

func newStateMachine(cmd string) *stateMachine {
sm := &stateMachine{
start: newState(),
end: newState(),
edges: make(map[string][]edge),
}
// prepare edges
switch cmd {
case "push", "attach":
sm.addPath("Uploading", "Uploaded")
sm.addPath("Exists")
sm.addPath("Skipped")
case "pull":
sm.addPath("Downloading", "Downloaded")
sm.addPath("Downloading", "Processing", "Downloaded")
sm.addPath("Skipped")
sm.addPath("Restored")
case "copy", "cp":
sm.addPath("Copying", "Copied")
sm.addPath("Skipped")
sm.addPath("Exists")
sm.addPath("Mounted")
default:
ginkgo.Fail("Unrecognized cmd name " + cmd)
}
return sm
}

@qweeah qweeah modified the milestones: v1.3.0, future Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants