From 60e20ee5312b4caa9ce3e98b633bf974b949b863 Mon Sep 17 00:00:00 2001 From: Tyler McGoffin Date: Thu, 17 Oct 2024 08:51:51 -0700 Subject: [PATCH] Add acceptance test for repo-clone --- acceptance/testdata/repos/repo-clone.txtar | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 acceptance/testdata/repos/repo-clone.txtar diff --git a/acceptance/testdata/repos/repo-clone.txtar b/acceptance/testdata/repos/repo-clone.txtar new file mode 100644 index 000000000..f0bad8e01 --- /dev/null +++ b/acceptance/testdata/repos/repo-clone.txtar @@ -0,0 +1,15 @@ +# Use gh as a credential helper +exec gh auth setup-git + +# Create a repository with a file so it has a default branch +exec gh repo create $ORG/$SCRIPT_NAME-$RANDOM_STRING --add-readme --private + +# Defer repo cleanup +defer gh repo delete --yes $ORG/$SCRIPT_NAME-$RANDOM_STRING + +# Clone the repo +exec gh repo clone $ORG/$SCRIPT_NAME-$RANDOM_STRING + +# Ensure the repo was cloned +exec ls $SCRIPT_NAME-$RANDOM_STRING +stdout README.md \ No newline at end of file