mirror of
https://github.com/goharbor/harbor.git
synced 2025-02-16 20:01:35 +01:00
Add GCS&S3 push-based replicatiton tests
1. Add GCS push-based replicatiton tests; There is an issue against it, so it's commented out; 2. Add S3 push-based replicatiton tests; 3. Add filter registry keyword; Signed-off-by: danfengliu <danfengl@vmware.com>
This commit is contained in:
parent
a2112bfa40
commit
8328e95b63
@ -1,140 +1,140 @@
|
|||||||
FROM golang:1.11.2
|
FROM golang:1.11.2
|
||||||
|
|
||||||
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
|
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
|
||||||
RUN sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
|
RUN sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
|
||||||
|
|
||||||
#RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && apt install ./google-chrome-stable_current_amd64.deb
|
#RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && apt install ./google-chrome-stable_current_amd64.deb
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
jq \
|
jq \
|
||||||
bc \
|
bc \
|
||||||
time \
|
time \
|
||||||
gcc \
|
gcc \
|
||||||
python-dev \
|
python-dev \
|
||||||
libffi-dev \
|
libffi-dev \
|
||||||
libssl-dev \
|
libssl-dev \
|
||||||
sshpass \
|
sshpass \
|
||||||
ant \
|
ant \
|
||||||
ant-optional \
|
ant-optional \
|
||||||
xvfb \
|
xvfb \
|
||||||
libxi6 \
|
libxi6 \
|
||||||
libgconf-2-4 \
|
libgconf-2-4 \
|
||||||
openjdk-8-jdk \
|
openjdk-8-jdk \
|
||||||
rpcbind \
|
rpcbind \
|
||||||
nfs-common \
|
nfs-common \
|
||||||
unzip \
|
unzip \
|
||||||
zip \
|
zip \
|
||||||
bzip2 \
|
bzip2 \
|
||||||
parted \
|
parted \
|
||||||
# Add docker in docker support
|
# Add docker in docker support
|
||||||
btrfs-tools \
|
btrfs-tools \
|
||||||
e2fsprogs \
|
e2fsprogs \
|
||||||
iptables \
|
iptables \
|
||||||
xfsprogs \
|
xfsprogs \
|
||||||
dnsutils \
|
dnsutils \
|
||||||
netcat \
|
netcat \
|
||||||
# Add headless chrome support
|
# Add headless chrome support
|
||||||
google-chrome-stable \
|
google-chrome-stable \
|
||||||
# Speed up ISO builds with already installed reqs
|
# Speed up ISO builds with already installed reqs
|
||||||
yum \
|
yum \
|
||||||
yum-utils \
|
yum-utils \
|
||||||
cpio \
|
cpio \
|
||||||
rpm \
|
rpm \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
xz-utils \
|
xz-utils \
|
||||||
xorriso \
|
xorriso \
|
||||||
sendmail && \
|
sendmail && \
|
||||||
# Cleanup
|
# Cleanup
|
||||||
apt-get autoremove -y && \
|
apt-get autoremove -y && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN wget -N http://chromedriver.storage.googleapis.com/2.40/chromedriver_linux64.zip && \
|
RUN wget -N http://chromedriver.storage.googleapis.com/2.40/chromedriver_linux64.zip && \
|
||||||
unzip chromedriver_linux64.zip && \
|
unzip chromedriver_linux64.zip && \
|
||||||
chmod +x chromedriver && \
|
chmod +x chromedriver && \
|
||||||
mv -f chromedriver /usr/local/share/chromedriver && \
|
mv -f chromedriver /usr/local/share/chromedriver && \
|
||||||
ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver && \
|
ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver && \
|
||||||
ln -s /usr/local/share/chromedriver /usr/bin/chromedriver
|
ln -s /usr/local/share/chromedriver /usr/bin/chromedriver
|
||||||
|
|
||||||
RUN apt-get update && apt install libnss3-tools && \
|
RUN apt-get update && apt install libnss3-tools && \
|
||||||
mkdir -p $HOME/.pki/nssdb && \
|
mkdir -p $HOME/.pki/nssdb && \
|
||||||
echo Harbor12345 > password.ca && \
|
echo Harbor12345 > password.ca && \
|
||||||
certutil -d sql:$HOME/.pki/nssdb -N -f password.ca
|
certutil -d sql:$HOME/.pki/nssdb -N -f password.ca
|
||||||
|
|
||||||
RUN wget https://bootstrap.pypa.io/get-pip.py && \
|
RUN wget https://bootstrap.pypa.io/get-pip.py && \
|
||||||
python ./get-pip.py && \
|
python ./get-pip.py && \
|
||||||
pip install pyasn1 google-apitools==0.5.15 gsutil robotframework==3.0.4 robotframework-sshlibrary robotframework-httplibrary requests dbbot robotframework-selenium2library robotframework-pabot robotframework-JSONLibrary --upgrade
|
pip install pyasn1 google-apitools==0.5.15 gsutil robotframework==3.0.4 robotframework-sshlibrary robotframework-httplibrary requests dbbot robotframework-selenium2library==4.4.0 robotframework-pabot robotframework-JSONLibrary --upgrade
|
||||||
|
|
||||||
# Install docker, docker compose
|
# Install docker, docker compose
|
||||||
RUN wget https://download.docker.com/linux/static/stable/x86_64/docker-18.06.3-ce.tgz && \
|
RUN wget https://download.docker.com/linux/static/stable/x86_64/docker-18.06.3-ce.tgz && \
|
||||||
tar --strip-components=1 -xvzf docker-18.06.3-ce.tgz -C /usr/bin && \
|
tar --strip-components=1 -xvzf docker-18.06.3-ce.tgz -C /usr/bin && \
|
||||||
curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && \
|
curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && \
|
||||||
chmod +x /usr/local/bin/docker-compose
|
chmod +x /usr/local/bin/docker-compose
|
||||||
|
|
||||||
RUN wget https://github.com/drone/drone-cli/releases/download/v0.8.3/drone_linux_amd64.tar.gz && tar zxf drone_linux_amd64.tar.gz && \
|
RUN wget https://github.com/drone/drone-cli/releases/download/v0.8.3/drone_linux_amd64.tar.gz && tar zxf drone_linux_amd64.tar.gz && \
|
||||||
install -t /usr/local/bin drone
|
install -t /usr/local/bin drone
|
||||||
|
|
||||||
RUN curl -sSL https://github.com/vmware/govmomi/releases/download/v0.16.0/govc_linux_amd64.gz | gzip -d > /usr/local/bin/govc && \
|
RUN curl -sSL https://github.com/vmware/govmomi/releases/download/v0.16.0/govc_linux_amd64.gz | gzip -d > /usr/local/bin/govc && \
|
||||||
chmod +x /usr/local/bin/govc
|
chmod +x /usr/local/bin/govc
|
||||||
|
|
||||||
RUN wget https://get.helm.sh/helm-v2.14.1-linux-386.tar.gz && tar zxvf helm-v2.14.1-linux-386.tar.gz && \
|
RUN wget https://get.helm.sh/helm-v2.14.1-linux-386.tar.gz && tar zxvf helm-v2.14.1-linux-386.tar.gz && \
|
||||||
mv linux-386/helm /usr/local/bin/helm && \
|
mv linux-386/helm /usr/local/bin/helm && \
|
||||||
helm init --client-only && \
|
helm init --client-only && \
|
||||||
helm plugin install https://github.com/chartmuseum/helm-push
|
helm plugin install https://github.com/chartmuseum/helm-push
|
||||||
|
|
||||||
RUN wget https://get.helm.sh/helm-v3.0.0-linux-386.tar.gz && tar zxvf helm-v3.0.0-linux-386.tar.gz && \
|
RUN wget https://get.helm.sh/helm-v3.0.0-linux-386.tar.gz && tar zxvf helm-v3.0.0-linux-386.tar.gz && \
|
||||||
mv linux-386/helm /usr/local/bin/helm3 && \
|
mv linux-386/helm /usr/local/bin/helm3 && \
|
||||||
helm3 plugin install https://github.com/chartmuseum/helm-push
|
helm3 plugin install https://github.com/chartmuseum/helm-push
|
||||||
|
|
||||||
RUN wget https://github.com/theupdateframework/notary/releases/download/v0.6.1/notary-Linux-amd64 && \
|
RUN wget https://github.com/theupdateframework/notary/releases/download/v0.6.1/notary-Linux-amd64 && \
|
||||||
chmod +x notary-Linux-amd64 && \
|
chmod +x notary-Linux-amd64 && \
|
||||||
mv notary-Linux-amd64 /usr/local/bin/notary
|
mv notary-Linux-amd64 /usr/local/bin/notary
|
||||||
|
|
||||||
RUN wget http://nchc.dl.sourceforge.net/sourceforge/tcl/tcl8.4.11-src.tar.gz && \
|
RUN wget http://nchc.dl.sourceforge.net/sourceforge/tcl/tcl8.4.11-src.tar.gz && \
|
||||||
tar xfvz tcl8.4.11-src.tar.gz && \
|
tar xfvz tcl8.4.11-src.tar.gz && \
|
||||||
cd tcl8.4.11/unix && \
|
cd tcl8.4.11/unix && \
|
||||||
sed -i "s/relid'/relid/" configure && \
|
sed -i "s/relid'/relid/" configure && \
|
||||||
./configure --prefix=/ixdba.net && \
|
./configure --prefix=/ixdba.net && \
|
||||||
make && \
|
make && \
|
||||||
make install && \
|
make install && \
|
||||||
cp -r * ../tools && \
|
cp -r * ../tools && \
|
||||||
cd .. && \
|
cd .. && \
|
||||||
cp -r tools / && \
|
cp -r tools / && \
|
||||||
cd / && \
|
cd / && \
|
||||||
wget http://sourceforge.net/projects/expect/files/Expect/5.45/expect5.45.tar.gz && \
|
wget http://sourceforge.net/projects/expect/files/Expect/5.45/expect5.45.tar.gz && \
|
||||||
tar xzvf expect5.45.tar.gz && \
|
tar xzvf expect5.45.tar.gz && \
|
||||||
cd expect5.45 && \
|
cd expect5.45 && \
|
||||||
./configure --prefix=/tools --with-tcl=/tools --with-x=no && \
|
./configure --prefix=/tools --with-tcl=/tools --with-x=no && \
|
||||||
make && \
|
make && \
|
||||||
make install && \
|
make install && \
|
||||||
cd /ixdba.net/bin && \
|
cd /ixdba.net/bin && \
|
||||||
mv expect /usr/local/bin/expect
|
mv expect /usr/local/bin/expect
|
||||||
|
|
||||||
RUN CNAB_PATH=$(go env GOPATH)/src/github.com/docker && mkdir -p $CNAB_PATH && cd $CNAB_PATH && git clone https://github.com/cnabio/cnab-to-oci.git && \
|
RUN CNAB_PATH=$(go env GOPATH)/src/github.com/docker && mkdir -p $CNAB_PATH && cd $CNAB_PATH && git clone https://github.com/cnabio/cnab-to-oci.git && \
|
||||||
cd cnab-to-oci && git checkout v0.3.0-beta4 && \
|
cd cnab-to-oci && git checkout v0.3.0-beta4 && \
|
||||||
go list && \
|
go list && \
|
||||||
make build && \
|
make build && \
|
||||||
mv bin/cnab-to-oci /usr/local/bin
|
mv bin/cnab-to-oci /usr/local/bin
|
||||||
|
|
||||||
# Add docker in docker support
|
# Add docker in docker support
|
||||||
# version: docker:1.13-dind
|
# version: docker:1.13-dind
|
||||||
# reference: https://github.com/docker-library/docker/blob/b202ec7e529f5426e2ad7e8c0a8b82cacd406573/1.13/dind/Dockerfile
|
# reference: https://github.com/docker-library/docker/blob/b202ec7e529f5426e2ad7e8c0a8b82cacd406573/1.13/dind/Dockerfile
|
||||||
#
|
#
|
||||||
# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#runtime-dependencies
|
# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#runtime-dependencies
|
||||||
|
|
||||||
# set up subuid/subgid so that "--userns-remap=default" works out-of-the-box
|
# set up subuid/subgid so that "--userns-remap=default" works out-of-the-box
|
||||||
RUN set -x \
|
RUN set -x \
|
||||||
&& groupadd --system dockremap \
|
&& groupadd --system dockremap \
|
||||||
&& adduser --system --ingroup dockremap dockremap \
|
&& adduser --system --ingroup dockremap dockremap \
|
||||||
&& echo 'dockremap:165536:65536' >> /etc/subuid \
|
&& echo 'dockremap:165536:65536' >> /etc/subuid \
|
||||||
&& echo 'dockremap:165536:65536' >> /etc/subgid
|
&& echo 'dockremap:165536:65536' >> /etc/subgid
|
||||||
|
|
||||||
ENV DIND_COMMIT 3b5fac462d21ca164b3778647420016315289034
|
ENV DIND_COMMIT 3b5fac462d21ca164b3778647420016315289034
|
||||||
|
|
||||||
RUN wget "https://raw.githubusercontent.com/docker/docker/${DIND_COMMIT}/hack/dind" -O /usr/local/bin/dind \
|
RUN wget "https://raw.githubusercontent.com/docker/docker/${DIND_COMMIT}/hack/dind" -O /usr/local/bin/dind \
|
||||||
&& chmod +x /usr/local/bin/dind
|
&& chmod +x /usr/local/bin/dind
|
||||||
|
|
||||||
# This container needs to be run in privileged mode(run with --privileged option) to make it work
|
# This container needs to be run in privileged mode(run with --privileged option) to make it work
|
||||||
COPY dockerd-entrypoint.sh /usr/local/bin/dockerd-entrypoint.sh
|
COPY dockerd-entrypoint.sh /usr/local/bin/dockerd-entrypoint.sh
|
||||||
RUN chmod +x /usr/local/bin/dockerd-entrypoint.sh
|
RUN chmod +x /usr/local/bin/dockerd-entrypoint.sh
|
||||||
|
|
||||||
VOLUME /var/lib/docker
|
VOLUME /var/lib/docker
|
||||||
|
@ -27,6 +27,14 @@ Filter Replication Rule
|
|||||||
Retry Wait Until Page Contains Element ${rule_name_element}
|
Retry Wait Until Page Contains Element ${rule_name_element}
|
||||||
Capture Page Screenshot filter_replic_${ruleName}.png
|
Capture Page Screenshot filter_replic_${ruleName}.png
|
||||||
|
|
||||||
|
Filter Registry
|
||||||
|
[Arguments] ${registry_name}
|
||||||
|
${registry_name_element}= Set Variable xpath=//clr-dg-cell[contains(.,'${registry_name}')]
|
||||||
|
Retry Element Click ${filter_registry_btn}
|
||||||
|
Retry Text Input ${filter_registry_input} ${ruleName}
|
||||||
|
Retry Wait Until Page Contains Element ${registry_name_element}
|
||||||
|
Capture Page Screenshot filter_repistry_${ruleName}.png
|
||||||
|
|
||||||
Select Dest Registry
|
Select Dest Registry
|
||||||
[Arguments] ${endpoint}
|
[Arguments] ${endpoint}
|
||||||
Retry Element Click ${dest_registry_dropdown_list}
|
Retry Element Click ${dest_registry_dropdown_list}
|
||||||
@ -68,7 +76,7 @@ Create A New Endpoint
|
|||||||
#cancel verify cert since we use a selfsigned cert
|
#cancel verify cert since we use a selfsigned cert
|
||||||
Retry Element Click ${destination_insecure_xpath}
|
Retry Element Click ${destination_insecure_xpath}
|
||||||
Run Keyword If '${save}' == 'Y' Run keyword Retry Double Keywords When Error Retry Element Click ${replication_save_xpath} Retry Wait Until Page Not Contains Element ${replication_save_xpath}
|
Run Keyword If '${save}' == 'Y' Run keyword Retry Double Keywords When Error Retry Element Click ${replication_save_xpath} Retry Wait Until Page Not Contains Element ${replication_save_xpath}
|
||||||
Run Keyword If '${save}' == 'Y' Run keyword Retry Wait Until Page Contains ${name}
|
Run Keyword If '${save}' == 'Y' Run keyword Filter Registry ${name}
|
||||||
Run Keyword If '${save}' == 'N' No Operation
|
Run Keyword If '${save}' == 'N' No Operation
|
||||||
|
|
||||||
Create A Rule With Existing Endpoint
|
Create A Rule With Existing Endpoint
|
||||||
@ -155,12 +163,6 @@ Delete Rule
|
|||||||
Mouse Up ${dialog_delete}
|
Mouse Up ${dialog_delete}
|
||||||
Sleep 2
|
Sleep 2
|
||||||
|
|
||||||
Filter Rule
|
|
||||||
[Arguments] ${rule}
|
|
||||||
Retry Element Click ${rule_filter_search}
|
|
||||||
Retry Text Input ${rule_filter_input} ${rule}
|
|
||||||
Sleep 1
|
|
||||||
|
|
||||||
Select Rule
|
Select Rule
|
||||||
[Arguments] ${rule}
|
[Arguments] ${rule}
|
||||||
Retry Element Click //clr-dg-row[contains(.,'${rule}')]//label
|
Retry Element Click //clr-dg-row[contains(.,'${rule}')]//label
|
||||||
@ -246,8 +248,8 @@ Delete Replication Rule
|
|||||||
Retry Element Click ${dialog_delete}
|
Retry Element Click ${dialog_delete}
|
||||||
|
|
||||||
Image Should Be Replicated To Project
|
Image Should Be Replicated To Project
|
||||||
[Arguments] ${project} ${image} ${period}=60 ${times}=10
|
[Arguments] ${project} ${image} ${period}=60 ${times}=3
|
||||||
:For ${n} IN RANGE 1 ${times}
|
:For ${n} IN RANGE 0 ${times}
|
||||||
\ Sleep ${period}
|
\ Sleep ${period}
|
||||||
\ Go Into Project ${project}
|
\ Go Into Project ${project}
|
||||||
\ Switch To Project Repo
|
\ Switch To Project Repo
|
||||||
|
@ -1,91 +1,93 @@
|
|||||||
# Copyright Project Harbor Authors
|
# Copyright Project Harbor Authors
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
# You may obtain a copy of the License at
|
# You may obtain a copy of the License at
|
||||||
#
|
#
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
#
|
#
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License
|
# limitations under the License
|
||||||
|
|
||||||
*** Settings ***
|
*** Settings ***
|
||||||
Documentation This resource provides any keywords related to the Harbor private registry appliance
|
Documentation This resource provides any keywords related to the Harbor private registry appliance
|
||||||
|
|
||||||
*** Variables ***
|
*** Variables ***
|
||||||
${new_name_xpath} //hbr-list-replication-rule//button[contains(.,'New')]
|
${new_name_xpath} //hbr-list-replication-rule//button[contains(.,'New')]
|
||||||
${policy_name_xpath} //*[@id='policy_name']
|
${policy_name_xpath} //*[@id='policy_name']
|
||||||
${policy_description_xpath} //*[@id='policy_description']
|
${policy_description_xpath} //*[@id='policy_description']
|
||||||
${policy_enable_checkbox} //input[@id='policy_enable']/../label
|
${policy_enable_checkbox} //input[@id='policy_enable']/../label
|
||||||
${policy_endpoint_checkbox} //input[@id='check_new']/../label
|
${policy_endpoint_checkbox} //input[@id='check_new']/../label
|
||||||
${destination_name_xpath} //*[@id='destination_name']
|
${destination_name_xpath} //*[@id='destination_name']
|
||||||
${destination_url_xpath} //*[@id='destination_url']
|
${destination_url_xpath} //*[@id='destination_url']
|
||||||
${destination_username_xpath} //*[@id='destination_access_key']
|
${destination_username_xpath} //*[@id='destination_access_key']
|
||||||
${destination_password_xpath} //*[@id='destination_password']
|
${destination_password_xpath} //*[@id='destination_password']
|
||||||
${replication_save_xpath} //button[contains(.,'OK')]
|
${replication_save_xpath} //button[contains(.,'OK')]
|
||||||
${replication_xpath} //clr-vertical-nav-group-children/a[contains(.,'Replication')]
|
${replication_xpath} //clr-vertical-nav-group-children/a[contains(.,'Replication')]
|
||||||
${destination_insecure_xpath} //label[@id='destination_insecure_checkbox']
|
${destination_insecure_xpath} //label[@id='destination_insecure_checkbox']
|
||||||
|
|
||||||
${new_replication-rule_button} //button[contains(.,'New Replication Rule')]
|
${new_replication-rule_button} //button[contains(.,'New Replication Rule')]
|
||||||
${link_to_registries} //clr-modal//span[contains(.,'Endpoint')]
|
${link_to_registries} //clr-modal//span[contains(.,'Endpoint')]
|
||||||
${new_endpoint_button} //hbr-endpoint//button[contains(.,'New Endpoint')]
|
${new_endpoint_button} //hbr-endpoint//button[contains(.,'New Endpoint')]
|
||||||
${rule_name} //input[@id='ruleName']
|
${rule_name} //input[@id='ruleName']
|
||||||
${source_image_filter_add} //hbr-create-edit-rule/clr-modal//clr-icon[@id='add-label-list']
|
${source_image_filter_add} //hbr-create-edit-rule/clr-modal//clr-icon[@id='add-label-list']
|
||||||
${source_iamge_repo_filter} //hbr-create-edit-rule//section/div[4]/div/div[1]/div/label/input
|
${source_iamge_repo_filter} //hbr-create-edit-rule//section/div[4]/div/div[1]/div/label/input
|
||||||
${source_image_tag_filter} //hbr-create-edit-rule//section/div[4]/div/div[2]/div/label/input
|
${source_image_tag_filter} //hbr-create-edit-rule//section/div[4]/div/div[2]/div/label/input
|
||||||
${rule_target_select} //select[@id='ruleTarget']
|
${rule_target_select} //select[@id='ruleTarget']
|
||||||
${rule_trigger_select} //select[@id='ruleTrigger']
|
${rule_trigger_select} //select[@id='ruleTrigger']
|
||||||
${schedule_type_select} //select[@name='scheduleType']
|
${schedule_type_select} //select[@name='scheduleType']
|
||||||
${schedule_day_select} //select[@name='scheduleDay']
|
${schedule_day_select} //select[@name='scheduleDay']
|
||||||
${shcedule_time} //input[@type='time']
|
${shcedule_time} //input[@type='time']
|
||||||
${destination_insecure_checkbox} //hbr-create-edit-endpoint/clr-modal//input[@id='destination_insecure']
|
${destination_insecure_checkbox} //hbr-create-edit-endpoint/clr-modal//input[@id='destination_insecure']
|
||||||
${ping_test_button} //button[contains(.,'Test')]
|
${ping_test_button} //button[contains(.,'Test')]
|
||||||
${nav_to_registries} //clr-vertical-nav//span[contains(.,'Registries')]
|
${nav_to_registries} //clr-vertical-nav//span[contains(.,'Registries')]
|
||||||
${nav_to_replications} //clr-vertical-nav//span[contains(.,'Replications')]
|
${nav_to_replications} //clr-vertical-nav//span[contains(.,'Replications')]
|
||||||
${rule_filter_search} //hbr-replication/div/div[1]//hbr-filter/span/clr-icon
|
${rule_filter_search} //hbr-replication/div/div[1]//hbr-filter/span/clr-icon
|
||||||
${rule_filter_input} //hbr-replication/div/div[1]//hbr-filter/span//input
|
${rule_filter_input} //hbr-replication/div/div[1]//hbr-filter/span//input
|
||||||
${job_filter_search} //hbr-replication/div/div[3]//hbr-filter/span/clr-icon
|
${job_filter_search} //hbr-replication/div/div[3]//hbr-filter/span/clr-icon
|
||||||
${job_filter_input} //hbr-replication/div/div[3]//hbr-filter/span//input
|
${job_filter_input} //hbr-replication/div/div[3]//hbr-filter/span//input
|
||||||
${endpoint_filter_search} //hbr-filter/span/clr-icon
|
${endpoint_filter_search} //hbr-filter/span/clr-icon
|
||||||
${endpoint_filter_input} //hbr-filter/span//input
|
${endpoint_filter_input} //hbr-filter/span//input
|
||||||
${action_bar_edit} //button[contains(.,'Edit')]
|
${action_bar_edit} //button[contains(.,'Edit')]
|
||||||
${action_bar_delete} //button[contains(.,'Delete')]
|
${action_bar_delete} //button[contains(.,'Delete')]
|
||||||
${stop_jobs_button} //button[contains(.,'Stop Jobs')]
|
${stop_jobs_button} //button[contains(.,'Stop Jobs')]
|
||||||
${dialog_close} //clr-modal//button[contains(.,'CLOSE')]
|
${dialog_close} //clr-modal//button[contains(.,'CLOSE')]
|
||||||
${dialog_delete} //clr-modal//button[contains(.,'DELETE')]
|
${dialog_delete} //clr-modal//button[contains(.,'DELETE')]
|
||||||
${dialog_replicate} //clr-modal//button[contains(.,'REPLICATE')]
|
${dialog_replicate} //clr-modal//button[contains(.,'REPLICATE')]
|
||||||
${action_bar_replicate} //button[contains(.,'Replicate')]
|
${action_bar_replicate} //button[contains(.,'Replicate')]
|
||||||
${rule_save_button} //button[contains(.,'SAVE')]
|
${rule_save_button} //button[contains(.,'SAVE')]
|
||||||
${provider_selector} //*[@id='adapter']
|
${provider_selector} //*[@id='adapter']
|
||||||
${replication_mode_radio_push} //clr-main-container//hbr-create-edit-rule//label[contains(.,'Push-based')]
|
${replication_mode_radio_push} //clr-main-container//hbr-create-edit-rule//label[contains(.,'Push-based')]
|
||||||
${replication_mode_radio_pull} //clr-main-container//hbr-create-edit-rule//label[contains(.,'Pull-based')]
|
${replication_mode_radio_pull} //clr-main-container//hbr-create-edit-rule//label[contains(.,'Pull-based')]
|
||||||
${filter_name_id} //input[@id='filter_name']
|
${filter_name_id} //input[@id='filter_name']
|
||||||
${filter_tag_id} //input[@id='filter_tag']
|
${filter_tag_id} //input[@id='filter_tag']
|
||||||
${rule_resource_selector} //*[@id='select_resource']
|
${rule_resource_selector} //*[@id='select_resource']
|
||||||
${trigger_mode_selector} //*[@id='ruleTrigger']
|
${trigger_mode_selector} //*[@id='ruleTrigger']
|
||||||
${dest_namespace_xpath} //*[@id='dest_namespace']
|
${dest_namespace_xpath} //*[@id='dest_namespace']
|
||||||
${new_replication_rule_id} //*[@id='new_replication_rule_id']
|
${new_replication_rule_id} //*[@id='new_replication_rule_id']
|
||||||
${edit_replication_rule_id} //*[@id='edit_replication_rule_id']
|
${edit_replication_rule_id} //*[@id='edit_replication_rule_id']
|
||||||
${delete_replication_rule_id} //*[@id='delete_replication_rule_id']
|
${delete_replication_rule_id} //*[@id='delete_replication_rule_id']
|
||||||
${replication_exec_id} //*[@id='replication_exe_id']
|
${replication_exec_id} //*[@id='replication_exe_id']
|
||||||
${replication_task_line_1} //clr-datagrid//clr-dg-row/div/div[2]//clr-checkbox-wrapper/label[1]
|
${replication_task_line_1} //clr-datagrid//clr-dg-row/div/div[2]//clr-checkbox-wrapper/label[1]
|
||||||
${is_overide_xpath} //label[contains(.,'Replace the destination resources if name exists')]
|
${is_overide_xpath} //label[contains(.,'Replace the destination resources if name exists')]
|
||||||
${enable_rule_xpath} //label[contains(.,'Enable rule')]
|
${enable_rule_xpath} //label[contains(.,'Enable rule')]
|
||||||
${targetCron_id} //*[@id='targetCron']
|
${targetCron_id} //*[@id='targetCron']
|
||||||
${rule_name_input} //*[@id='ruleName']
|
${rule_name_input} //*[@id='ruleName']
|
||||||
${src_registry_dropdown_list} //select[@id='src_registry_id']
|
${src_registry_dropdown_list} //select[@id='src_registry_id']
|
||||||
${dest_registry_dropdown_list} //select[@id='dest_registry']
|
${dest_registry_dropdown_list} //select[@id='dest_registry']
|
||||||
${rule_confirm_btn} //*[@id='ruleBtnOk']
|
${rule_confirm_btn} //*[@id='ruleBtnOk']
|
||||||
${rule_cancel_btn} //*[@id='ruleBtnCancel']
|
${rule_cancel_btn} //*[@id='ruleBtnCancel']
|
||||||
${filter_rules_btn} //*[@id='filter-rules']
|
${filter_rules_btn} //*[@id='filter-rules']
|
||||||
${filter_rules_input} //*[@id='filter-rules']//input
|
${filter_rules_input} //*[@id='filter-rules']//input
|
||||||
${del_remote_checkbox} //label[@for='ruleDeletion']
|
${del_remote_checkbox} //label[@for='ruleDeletion']
|
||||||
|
${filter_registry_btn} //hbr-filter
|
||||||
|
${filter_registry_input} //input[contains(@class,'filter-input')]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -186,7 +186,7 @@ Manage Project Member Without Sign In Harbor
|
|||||||
[Arguments] ${sign_in_user} ${sign_in_pwd} ${test_user1}=user005 ${test_user2}=user006 ${is_oidc_mode}=${false}
|
[Arguments] ${sign_in_user} ${sign_in_pwd} ${test_user1}=user005 ${test_user2}=user006 ${is_oidc_mode}=${false}
|
||||||
${d}= Get current Date result_format=%m%s
|
${d}= Get current Date result_format=%m%s
|
||||||
Create An New Project And Go Into Project project${d}
|
Create An New Project And Go Into Project project${d}
|
||||||
Push image ip=${ip} user=${sign_in_user} pwd=${sign_in_pwd} project=project${d} image=hello-world
|
Push image ${ip} ${sign_in_user} ${sign_in_pwd} project${d} hello-world
|
||||||
Logout Harbor
|
Logout Harbor
|
||||||
|
|
||||||
User Should Not Be A Member Of Project ${test_user1} ${sign_in_pwd} project${d} is_oidc_mode=${is_oidc_mode}
|
User Should Not Be A Member Of Project ${test_user1} ${sign_in_pwd} project${d} is_oidc_mode=${is_oidc_mode}
|
||||||
@ -200,7 +200,7 @@ Manage Project Member Without Sign In Harbor
|
|||||||
User Should Be Maintainer ${test_user1} ${sign_in_pwd} project${d} is_oidc_mode=${is_oidc_mode}
|
User Should Be Maintainer ${test_user1} ${sign_in_pwd} project${d} is_oidc_mode=${is_oidc_mode}
|
||||||
Manage Project Member ${sign_in_user} ${sign_in_pwd} project${d} ${test_user1} Remove is_oidc_mode=${is_oidc_mode}
|
Manage Project Member ${sign_in_user} ${sign_in_pwd} project${d} ${test_user1} Remove is_oidc_mode=${is_oidc_mode}
|
||||||
User Should Not Be A Member Of Project ${test_user1} ${sign_in_pwd} project${d} is_oidc_mode=${is_oidc_mode}
|
User Should Not Be A Member Of Project ${test_user1} ${sign_in_pwd} project${d} is_oidc_mode=${is_oidc_mode}
|
||||||
Push image ip=${ip} user=${sign_in_user} pwd=${sign_in_pwd} project=project${d} image=hello-world
|
Push image ${ip} ${sign_in_user} ${sign_in_pwd} project${d} hello-world
|
||||||
User Should Be Guest ${test_user2} ${sign_in_pwd} project${d} is_oidc_mode=${is_oidc_mode}
|
User Should Be Guest ${test_user2} ${sign_in_pwd} project${d} is_oidc_mode=${is_oidc_mode}
|
||||||
|
|
||||||
Helm CLI Push Without Sign In Harbor
|
Helm CLI Push Without Sign In Harbor
|
||||||
@ -315,3 +315,31 @@ Body Of Verfiy Project Level CVE Allowlist By Quick Way of Add System
|
|||||||
Add System CVE Allowlist to Project CVE Allowlist By Add System Button Click
|
Add System CVE Allowlist to Project CVE Allowlist By Add System Button Click
|
||||||
Pull Image ${ip} ${signin_user} ${signin_pwd} project${d} ${image} tag=${sha256}
|
Pull Image ${ip} ${signin_user} ${signin_pwd} project${d} ${image} tag=${sha256}
|
||||||
Close Browser
|
Close Browser
|
||||||
|
|
||||||
|
Body Of Replication Of Push Images to Registry Triggered By Event
|
||||||
|
[Arguments] ${provider} ${endpoint} ${username} ${pwd} ${dest_namespace}
|
||||||
|
Init Chrome Driver
|
||||||
|
${d}= Get Current Date result_format=%m%s
|
||||||
|
${sha256}= Set Variable 0e67625224c1da47cb3270e7a861a83e332f708d3d89dde0cbed432c94824d9a
|
||||||
|
${image}= Set Variable test_push_repli
|
||||||
|
${tag1}= Set Variable v1.1.0
|
||||||
|
@{tags} Create List ${tag1}
|
||||||
|
#login source
|
||||||
|
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
|
||||||
|
Create An New Project And Go Into Project project${d}
|
||||||
|
Switch To Registries
|
||||||
|
Create A New Endpoint ${provider} e${d} ${endpoint} ${username} ${pwd} Y
|
||||||
|
Switch To Replication Manage
|
||||||
|
Create A Rule With Existing Endpoint rule${d} push project${d}/* image e${d} ${dest_namespace} mode=Event Based del_remote=${true}
|
||||||
|
Push Special Image To Project project${d} ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} ${image} tags=@{tags} size=12
|
||||||
|
Filter Replication Rule rule${d}
|
||||||
|
Select Rule rule${d}
|
||||||
|
Run Keyword If '${provider}'=='docker-hub' Docker Image Can Be Pulled ${dest_namespace}/${image}:${tag1} times=3
|
||||||
|
Executions Result Count Should Be Succeeded event_based 1
|
||||||
|
Go Into Project project${d}
|
||||||
|
Delete Repo project${d}
|
||||||
|
Run Keyword If '${provider}'=='docker-hub' Docker Image Can Not Be Pulled ${dest_namespace}/${image}:${tag1}
|
||||||
|
Switch To Replication Manage
|
||||||
|
Filter Replication Rule rule${d}
|
||||||
|
Select Rule rule${d}
|
||||||
|
Executions Result Count Should Be Succeeded event_based 2
|
@ -71,7 +71,7 @@ Test Case - Generate User CLI Secret
|
|||||||
Sign In Harbor With OIDC User ${HARBOR_URL}
|
Sign In Harbor With OIDC User ${HARBOR_URL}
|
||||||
Create An New Project And Go Into Project project${d}
|
Create An New Project And Go Into Project project${d}
|
||||||
${secret_old}= Get Secrete By API ${HARBOR_URL}
|
${secret_old}= Get Secrete By API ${HARBOR_URL}
|
||||||
Push image ip=${ip} user=${OIDC_USERNAME} pwd=${secret_old} project=project${d} image=${image}
|
Push image ${ip} ${OIDC_USERNAME} ${secret_old} project${d} ${image}
|
||||||
${secret_new}= Generate And Return Secret ${HARBOR_URL}
|
${secret_new}= Generate And Return Secret ${HARBOR_URL}
|
||||||
Log To Console ${secret_old}
|
Log To Console ${secret_old}
|
||||||
Log To Console ${secret_new}
|
Log To Console ${secret_new}
|
||||||
|
@ -275,28 +275,11 @@ Test Case - Replication Of Pull Images from Google-GCR To Self
|
|||||||
Close Browser
|
Close Browser
|
||||||
|
|
||||||
Test Case - Replication Of Push Images to DockerHub Triggered By Event
|
Test Case - Replication Of Push Images to DockerHub Triggered By Event
|
||||||
Init Chrome Driver
|
Body Of Replication Of Push Images to Registry Triggered By Event docker-hub https://hub.docker.com/ danfengliu Aa123456 danfengliu
|
||||||
${d}= Get Current Date result_format=%m%s
|
|
||||||
${sha256}= Set Variable 0e67625224c1da47cb3270e7a861a83e332f708d3d89dde0cbed432c94824d9a
|
#Due to issue of delete event replication
|
||||||
${image}= Set Variable test_push_repli
|
#Test Case - Replication Of Push Images to Google-GCR Triggered By Event
|
||||||
${tag1}= Set Variable v1.1.0
|
#Body Of Replication Of Push Images to Registry Triggered By Event google-gcr gcr.io ${null} ${gcr_ac_key} eminent-nation-87317/harbor-nightly-replication
|
||||||
@{tags} Create List ${tag1}
|
|
||||||
#login source
|
Test Case - Replication Of Push Images to AWS-ECR Triggered By Event
|
||||||
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
|
Body Of Replication Of Push Images to Registry Triggered By Event aws-ecr us-east-2 ${ecr_ac_id} ${ecr_ac_key} harbor-nightly-replication
|
||||||
Create An New Project And Go Into Project project${d}
|
|
||||||
Switch To Registries
|
|
||||||
Create A New Endpoint docker-hub e${d} https://hub.docker.com/ danfengliu Aa123456 Y
|
|
||||||
Switch To Replication Manage
|
|
||||||
Create A Rule With Existing Endpoint rule${d} push project${d}/* image e${d} danfengliu mode=Event Based del_remote=${true}
|
|
||||||
Push Special Image To Project project${d} ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} ${image} tags=@{tags} size=12
|
|
||||||
Filter Replication Rule rule${d}
|
|
||||||
Select Rule rule${d}
|
|
||||||
Docker Image Can Be Pulled danfengliu/${image}:${tag1} times=3
|
|
||||||
Executions Result Count Should Be Succeeded event_based 1
|
|
||||||
Go Into Project project${d}
|
|
||||||
Delete Repo project${d}
|
|
||||||
Docker Image Can Not Be Pulled danfengliu/${image}:${tag1}
|
|
||||||
Switch To Replication Manage
|
|
||||||
Filter Replication Rule rule${d}
|
|
||||||
Select Rule rule${d}
|
|
||||||
Executions Result Count Should Be Succeeded event_based 2
|
|
Loading…
Reference in New Issue
Block a user