Skip to content

Commit 814c550

Browse files
Merge pull request #4034 from praveenkumar/USHIFT-4343
USHIFT-4343: Add test scenario for flannel CNI plugin
2 parents c925e4a + 6945dbe commit 814c550

File tree

4 files changed

+45
-1
lines changed

4 files changed

+45
-1
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ rpm-podman:
331331
--rm -i \
332332
--volume $$(pwd):/opt/microshift:z \
333333
--env TARGET_ARCH=$(TARGET_ARCH) \
334+
--env WITH_FLANNEL=$(WITH_FLANNEL) \
334335
microshift-builder:$(RPM_BUILDER_IMAGE_TAG) \
335336
bash -ilc 'cd /opt/microshift && make rpm & pid=$$! ; \
336337
trap "echo Killing make PID $${pid}; kill $${pid}" INT ; \

test/bin/ci_phase_iso_build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ cd "${ROOTDIR}/test/"
125125
source "${SCRIPTDIR}/common.sh"
126126

127127
# Re-build from source.
128-
$(dry_run) bash -x ./bin/build_rpms.sh
128+
$(dry_run) env WITH_FLANNEL=1 bash -x ./bin/build_rpms.sh
129129

130130
if ${COMPOSER_CLI_BUILDS} ; then
131131
# Determine and create the ideal number of workers
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM localhost/cos9-bootc-source:latest
2+
3+
# Build arguments
4+
ARG USHIFT_RPM_REPO_NAME=microshift-local
5+
ARG USHIFT_RPM_REPO_PATH=/tmp/$USHIFT_RPM_REPO_NAME
6+
7+
# Copy the MicroShift repository contents
8+
COPY ./rpm-repos/$USHIFT_RPM_REPO_NAME $USHIFT_RPM_REPO_PATH
9+
10+
# Copy repository configuration
11+
COPY ./bootc-images/$USHIFT_RPM_REPO_NAME.repo ./bootc-images/microshift-centos9-nfv.repo ./bootc-images/microshift-rhocp-y.repo \
12+
/etc/yum.repos.d/
13+
14+
# Print repository configuration contents.
15+
# Install MicroShift optional packages and cleanup.
16+
RUN dnf repoinfo --enabled && \
17+
dnf install -y "microshift-flannel-{{ .Env.SOURCE_VERSION }}" && \
18+
rm -vf /etc/yum.repos.d/microshift-*.repo && \
19+
rm -rvf $USHIFT_RPM_REPO_PATH && \
20+
dnf clean all
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
3+
# Sourced from scenario.sh and uses functions defined there.
4+
5+
scenario_create_vms() {
6+
prepare_kickstart host1 kickstart-bootc.ks.template cos9-bootc-source
7+
launch_vm --boot_blueprint centos9-bootc --bootc
8+
9+
# Open the firewall ports. Other scenarios get this behavior by
10+
# embedding settings in the blueprint, but there is no blueprint
11+
# for this scenario. We need do this step before running the RF
12+
# suite so that suite can assume it can reach all of the same
13+
# ports as for any other test.
14+
configure_vm_firewall host1
15+
}
16+
17+
scenario_remove_vms() {
18+
remove_vm host1
19+
}
20+
21+
scenario_run_tests() {
22+
run_tests host1 suites/standard1/networking-smoke.robot
23+
}

0 commit comments

Comments
 (0)