Add wasm-to-oci test cases for harbor push and pull

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
This commit is contained in:
Yang Jiao 2021-10-28 16:09:13 +08:00
parent 7b75a456d3
commit 37bc1872e2
3 changed files with 19 additions and 1 deletions

View File

@ -826,3 +826,18 @@ Test Case - Go To Harbor Api Page
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
Retry Keyword N Times When Error 4 Check Harbor Api Page
Close Browser
Test Case - WASM Push And Pull To Harbor
[Tags] wasm_push_and_pull_to_harbor
Init Chrome Driver
${user}= Set Variable user004
${pwd}= Set Variable Test1@34
Sign In Harbor ${HARBOR_URL} ${user} ${pwd}
${d}= Get Current Date result_format=%m%s
Create An New Project And Go Into Project project${d}
Run wget https://github.com/engineerd/wasm-to-oci/blob/v0.1.2/testdata/hello.wasm
Wait Unitl Command Success docker login -u ${user} -p ${pwd} ${ip}
Wait Unitl Command Success wasm-to-oci push hello.wasm ${ip}/project${d}/wasm-to-oci:v1
Wait Unitl Command Success wasm-to-oci pull ${ip}/project${d}/wasm-to-oci:v1 --out test.wasm
Wait Unitl Command Success docker logout ${ip}
Retry file should exist test.wasm

View File

@ -62,6 +62,9 @@ RUN pwd && mkdir /tool/binary && \
DIND_COMMIT=3b5fac462d21ca164b3778647420016315289034 && \
wget "https://raw.githubusercontent.com/docker/docker/${DIND_COMMIT}/hack/dind" -O /tool/binary/dind \
&& chmod +x /tool/binary/dind && \
# Install wasm-to-oci
WASM_TO_OCI_VERSION=0.1.2 && wget https://github.com/engineerd/wasm-to-oci/releases/download/v${WASM_TO_OCI_VERSION}/linux-amd64-wasm-to-oci && \
chmod +x linux-amd64-wasm-to-oci && mv linux-amd64-wasm-to-oci /tool/binary/wasm-to-oci && \
pwd
#ubuntu

View File

@ -35,7 +35,7 @@ RUN pip3 install --upgrade pip pyasn1 google-apitools==0.5.31 gsutil \
robotframework-JSONLibrary hurry.filesize --upgrade && \
apt-get clean all
# Because the old version of chromedriver cant download files, upgrade it to version 93.0.4577.15, which can download files normally.
RUN wget -N http://chromedriver.storage.googleapis.com/93.0.4577.15/chromedriver_linux64.zip && \
RUN wget -N http://chromedriver.storage.googleapis.com/95.0.4638.54/chromedriver_linux64.zip && \
unzip chromedriver_linux64.zip && \
chmod +x chromedriver && \
mv -f chromedriver /usr/local/share/chromedriver && \