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

test: add non-interactive init/pull in git-cloned project #11365

Merged
merged 7 commits into from
Nov 11, 2022

Conversation

edwardfoyle
Copy link
Contributor

@edwardfoyle edwardfoyle commented Nov 9, 2022

Description of changes

Adds 2 new E2E tests for exercising non-interactive pull and init in git-cloned projects

The tests simulate git cloning by using git clean -fdx which removes any files not tracked by git.

Issue #, if available

Description of how you validated changes

Ran new E2E tests locally and running entire suite here: https://app.circleci.com/pipelines/github/aws-amplify/amplify-cli/12411/workflows/b687e49a-4bcd-457a-bff4-b6c73ffabd15

Checklist

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@edwardfoyle edwardfoyle requested a review from a team as a code owner November 9, 2022 20:53
@edwardfoyle edwardfoyle changed the title Run e2e/foyleef/git clone tests test: add non-interactive init/pull in git-cloned project Nov 9, 2022
/* eslint-disable func-style */
/* eslint-disable @typescript-eslint/explicit-function-return-type */
/* eslint-disable jsdoc/require-jsdoc */
/* eslint-disable import/no-cycle */
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file is minimal lint fixes after moving the isCI function to a different file

export function amplifyOverrideRoot(cwd: string, settings: { testingWithLatestCodebase?: boolean }) {
return new Promise((resolve, reject) => {
const args = ['override', 'project'];
export const amplifyOverrideRoot = (cwd: string, settings: { testingWithLatestCodebase?: boolean }): Promise<void> => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file is just lint fixes

jhockett
jhockett previously approved these changes Nov 10, 2022
sobolk
sobolk previously approved these changes Nov 11, 2022
Comment on lines +1 to +3
/**
* Shape of awscloudformation object within `--profile` payload for init/pull
*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we have a similar type in prod code base?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't have an exact corollary but we have some types here that define the credential config (plus other values that it can have)

packages/amplify-e2e-core/src/utils/index.ts Outdated Show resolved Hide resolved
@edwardfoyle edwardfoyle dismissed stale reviews from sobolk and jhockett via 9216556 November 11, 2022 18:01
@edwardfoyle edwardfoyle merged commit 03cee46 into dev Nov 11, 2022
@edwardfoyle edwardfoyle deleted the run-e2e/foyleef/git-clone-tests branch November 11, 2022 19:17
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

Successfully merging this pull request may close these issues.

3 participants