Tim Hockin
9241b1061f
Exercise the git "dubious ownership" path
...
To do this, we run the e2e test as a different user. To do that, we
need git-sync to make sure that everything is group accessible. To
clean up after the test, we need everything to be group writable. To do
that, we add a new flag: `--group-write`.
2023-03-17 15:51:25 -07:00
Tim Hockin
3eb34e058c
Fix cases of syncing different SHAs back to back
...
Prior to this, it would fail if the 2nd SHA wasn't in the local repo.
Now it doesn't care what the local SHA for rev is, it only cares what is
checked out at HEAD.
Also deref tags on ls-remote
The short story: `ls-remote` for a tag gets us the SHA of the tag, but
`rev-parse HEAD` gets us the SHA of the commit to which that tag is
attached. Those are never equal, so we detect "update needed" every
loop.
Now we ask `ls-remote` for the rev and the dereferenced rev. If that
rev is a branch, the deref does nothing. If that rev is a tag it
produces both results. ls-remote does its own sort, so the deref (if
found) comes after the non-deref. This means that, in both cases, the
last line is the one we want.
2023-02-10 21:07:03 -08:00
Tim Hockin
c5ec0558be
e2e: allow file:// repos (missing piece)
2023-02-06 17:40:14 -08:00
Tim Hockin
7a284454ea
e2e: fix test-tool image names
2023-02-06 17:39:36 -08:00
Tim Hockin
e712435cf0
e2e: fix git submodules for file://
...
I guess upstream git intentionally broke this because of a CVE.
Also fix tag tests to pass -m
2022-11-23 23:56:50 -08:00
Kubernetes Prow Robot
f8a94697a3
Merge pull request #575 from thockin/v3_e2e_password_not_one_time
...
v3: e2e: Make password test not use --one-time
2022-07-07 23:33:49 -07:00
Kubernetes Prow Robot
97b22dd214
Merge pull request #573 from thockin/v3_no_XDG_CONFIG_HOME
...
v3: e2e: don't set XDG_CONFIG_HOME
2022-07-07 05:19:35 -07:00
Kubernetes Prow Robot
25b93107c5
Merge pull request #569 from thockin/v3_e2e_CLEANUP_docker_rm
...
v3: e2e: $CLEANUP decides whether to rm containers
2022-07-07 04:45:35 -07:00
Tim Hockin
506314904a
e2e: Fix ncsvr to wait for input on HTTP
...
This caused occasional e2e flakes when the server responded before the
client request had been sent.
2022-07-06 12:22:21 -07:00
Tim Hockin
4b75fbce48
e2e: don't set XDG_CONFIG_HOME
2022-07-03 16:52:55 -07:00
Kubernetes Prow Robot
d4b880c6b6
Merge pull request #563 from thockin/v3_e2e_rebuild_less
...
v3: e2e: rebuild the container less often
2022-07-03 14:31:22 -07:00
Tim Hockin
7763f7c115
e2e: Make password test not use --one-time
2022-07-03 11:27:03 -07:00
Tim Hockin
6d5902196a
e2e: $CLEANUP decides whether to rm containers
2022-07-03 11:25:14 -07:00
Tim Hockin
28951b5b2f
Don't run apt-get in e2e build if we can avoid
2022-07-03 11:16:34 -07:00
Tim Hockin
54b207fe56
e2e: rebuild container less often
2022-07-03 11:16:34 -07:00
Tim Hockin
69702eec2f
Rename tests for better filtering
2022-07-03 11:14:21 -07:00
Tim Hockin
185074f250
Beef up askpass_url support
...
* Don't need to get the password at startup (it happens in the sync loop
anyway)
* Add tests for bad password and flaky URL
2022-07-02 15:43:01 -07:00
Kubernetes Prow Robot
3520002163
Merge pull request #556 from thockin/v3_e2e_v6
...
v3: e2e with -v=6
2022-07-02 13:11:24 -07:00
Kubernetes Prow Robot
43fde5ff1d
Merge pull request #546 from thockin/v3-dont-docker-kill
...
v3: e2e: Don't manually "docker kill"
2022-07-02 12:59:24 -07:00
Tim Hockin
a424130b36
e2e with -v=6
2022-07-02 10:59:26 -07:00
Kubernetes Prow Robot
0e4b04d70a
Merge pull request #550 from thockin/v3-passwd_e2e_split
...
v3: Split password test to 2 - right and wrong passwd
2022-07-02 03:53:24 -07:00
Tim Hockin
6a5ca2981f
Split password test to 2 - right and wrong passwd
2022-06-24 09:43:29 -07:00
Tim Hockin
59b3576105
e2e: Reformat ncsvr scripts for readability
2022-06-24 09:42:10 -07:00
Tim Hockin
5f6b04eae2
e2e: Don't manually "docker kill"
...
It happens automatically on test cleanup
2022-06-24 09:41:58 -07:00
Tim Hockin
414839fc62
Make ssh e2e test not use --one-time
...
There is functionality that needs to be tested beyond that.
2022-06-11 10:52:45 -07:00
Tim Hockin
9f02915f02
Pass CLEANUP=0 to test_e2e to leave logs
2022-06-11 19:49:23 +02:00
Tim Hockin
812da0c43e
Pass the whole environment to exechooks
2022-05-16 18:07:46 -07:00
Tim Hockin
d1c8a4277c
reorder test cases
2022-03-11 08:41:01 -08:00
Tim Hockin
ce4f7a192d
rename test case
2022-03-11 08:41:01 -08:00
Kubernetes Prow Robot
dbbebf2e48
Merge pull request #499 from sed-i/feature/support_repo_change
...
Support repo change between invocations
2022-03-10 17:08:08 -08:00
sed-i
c3791f59b2
Add volume mount for the repo sync test
2022-02-25 11:51:01 -05:00
sed-i
9780b620c0
Add repo-sync test
2022-02-25 03:46:37 -05:00
Tim Hockin
5707870ecc
Make e2e treat args as tests-name regexes
2022-02-24 09:04:24 -08:00
Tim Hockin
ad3955c0fa
Add --git-gc flag to control GC on each sync
...
Values:
* "auto" - run `git gc --auto` (default, respects git gc.* configs)
* "always" - run `git gc`
* "aggressive" - run `git gc --aggressive` (may require a longer timeout)
* "off" - do not run `git gc` on each sync (good for --one-time use)
2022-02-23 16:23:55 -08:00
Tim Hockin
ff156800a0
Set repoReady even when there wasn't a 1st clone
...
E.g. if the repo is already present (after a restart).
2022-02-12 17:35:04 -08:00
Kubernetes Prow Robot
0ce336f03c
Merge pull request #477 from thockin/v3-link-abspath
...
Allow --dest to be an absolute path (v3)
2022-01-23 02:37:56 -08:00
Tim Hockin
ce8c4d38e0
Allow --dest to be an absolute path
...
This means it might live outside of --root.
2022-01-22 23:26:36 -08:00
Tim Hockin
fb895f2c12
Don't try to remove the root if it appears corrupt
...
The `--root` is often a volume and can't be removed. Instead, remove
the contents of it. Adjust tests to hit this.
2022-01-22 12:47:19 -08:00
Tim Hockin
d88ae88b34
Fix e2e, dropped 'finish()' func
2022-01-21 20:24:09 -08:00
Tim Hockin
89b0bd5448
Ensure web/exec hooks complete in --one-time
...
Also some small e2e cleanups. This is a port from master branch.
2022-01-19 12:01:15 -08:00
Tim Hockin
aceea84578
E2E: build IFF running tests
2021-10-18 09:38:06 -07:00
Tim Hockin
fb9dd2d730
E2E: Add whitespace for reading
2021-10-18 09:38:06 -07:00
Tim Hockin
d190159438
E2E: Rename test funcs
2021-10-18 09:38:06 -07:00
Tim Hockin
dbd0b47635
E2E: make all test cases be funcs
...
Make all test cases functions so they can be called individually on the
CLI. Call test_e2e.sh with `-?` to list tests. Fix related crashes
2021-10-18 09:38:06 -07:00
Tim Hockin
e1ea155f92
E2E: Make SIGINT handling more complete
2021-10-18 09:38:06 -07:00
Tim Hockin
470d70bb42
E2E: Use vars for branch names
2021-10-18 09:38:06 -07:00
Tim Hockin
62830c2a19
E2E: always use '[[ ]]'
2021-10-18 09:38:06 -07:00
Tim Hockin
722ad23e60
Fix e2e cases to not destroy logs
2021-10-18 09:38:06 -07:00
Natalie Baker
2c3bb035f6
Use hash for branch when adding a new worktree
2021-10-04 16:55:32 -04:00
ugurkenar
df69fab365
cmd,hook and logging package
2021-08-16 12:40:27 +03:00