mirror of
https://github.com/project-zot/zot.git
synced 2024-12-16 21:56:37 -05:00
sync: fix inconsistent test
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
This commit is contained in:
parent
554e99a967
commit
03dd558ec6
1 changed files with 8 additions and 8 deletions
|
@ -609,6 +609,14 @@ func TestOnDemandPermsDenied(t *testing.T) {
|
|||
dctlr.Shutdown()
|
||||
}()
|
||||
|
||||
syncSubDir := path.Join(destDir, testImage, sync.SyncBlobUploadDir)
|
||||
|
||||
err := os.MkdirAll(syncSubDir, 0o755)
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
err = os.Chmod(syncSubDir, 0o000)
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
go func() {
|
||||
// this blocks
|
||||
if err := dctlr.Run(context.Background()); err != nil {
|
||||
|
@ -618,14 +626,6 @@ func TestOnDemandPermsDenied(t *testing.T) {
|
|||
|
||||
test.WaitTillServerReady(destBaseURL)
|
||||
|
||||
syncSubDir := path.Join(destDir, testImage, sync.SyncBlobUploadDir)
|
||||
|
||||
err := os.MkdirAll(syncSubDir, 0o755)
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
err = os.Chmod(syncSubDir, 0o000)
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
resp, err := resty.R().Get(destBaseURL + "/v2/" + testImage + "/manifests/" + testImageTag)
|
||||
So(err, ShouldBeNil)
|
||||
So(resp.StatusCode(), ShouldEqual, 404)
|
||||
|
|
Loading…
Reference in a new issue