Skip to content

Commit 641773b

Browse files
committed
Rename centos to fedora
1 parent 2611066 commit 641773b

30 files changed

+41
-40
lines changed

.cirrus.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ task:
44
matrix:
55
VERSION: 1.20
66
VERSION: 1.21
7+
VERSION: 1.22
78

89
container:
910
image: golang:$VERSION

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ RECORD_SRC = $(wildcard pkg/record/*.go)
2121
UTILS_SRC= $(wildcard pkg/utils/*.go)
2222

2323
PKGS= $(shell $(GO) list ./... | grep -v /vendor/)
24-
TEST= test/centos-image/sshproxy_test.go
24+
TEST= test/fedora-image/sshproxy_test.go
2525
EXE= $(addprefix bin/, sshproxy sshproxy-dumpd sshproxy-replay sshproxyctl)
2626
MANDOC= doc/sshproxy.yaml.5 doc/sshproxy.8 doc/sshproxy-dumpd.8 doc/sshproxy-replay.8 doc/sshproxyctl.8
2727
PACKAGE = sshproxy_$(SSHPROXY_VERSION)_$(shell uname -s)_$(shell uname -p)

test/README.asciidoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ The functional tests are run with +docker-compose+. The +run.sh+ script is a
88
wrapper to automatically start the tests (e.g. when using +make test+).
99

1010
Every container is created with the same +Dockerfile+ found in the
11-
+centos-image+ directory. All scripts started in the containers are located in
12-
the +centos-image+ directory.
11+
+fedora-image+ directory. All scripts started in the containers are located in
12+
the +fedora-image+ directory.
1313

1414
The following containers will be created:
1515

@@ -31,7 +31,7 @@ server{1,2,3}::
3131
destinations configured in sshproxy. They all execute an SSH server.
3232

3333
The tests that run on tester use the Go test framework and can be found in the
34-
+centos-image/sshproxy_test.go+ file.
34+
+fedora-image/sshproxy_test.go+ file.
3535

3636
How to debug the tests?
3737
-----------------------
@@ -64,12 +64,12 @@ Then we start (and build if necessary) all containers:
6464
Once every container is started, we can connect to the tester container:
6565

6666
$ docker-compose exec tester /bin/bash
67-
[centos@tester ~]$
67+
[fedora@tester ~]$
6868

6969
We then use the +go test+ command to run the tests:
7070

7171
------------------------------------------------------------------------------
72-
[centos@tester ~]$ go test -v -failfast -tags docker sshproxy_test.go
72+
[fedora@tester ~]$ go test -v -failfast -tags docker sshproxy_test.go
7373
=== RUN TestSimpleConnect
7474
--- PASS: TestSimpleConnect (1.58s)
7575
=== RUN TestReturnCode

test/docker-compose.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ services:
44
tester:
55
container_name: tester
66
hostname: tester
7-
build: centos-image
8-
user: centos
9-
working_dir: /home/centos
7+
build: fedora-image
8+
user: fedora
9+
working_dir: /home/fedora
1010
depends_on:
1111
- gateway1
1212
- gateway2
@@ -19,7 +19,7 @@ services:
1919
gateway1:
2020
container_name: gateway1
2121
hostname: gateway1
22-
build: centos-image
22+
build: fedora-image
2323
volumes:
2424
- ../../sshproxy:/sshproxy
2525
expose:
@@ -34,7 +34,7 @@ services:
3434
gateway2:
3535
container_name: gateway2
3636
hostname: gateway2
37-
build: centos-image
37+
build: fedora-image
3838
volumes:
3939
- ../../sshproxy:/sshproxy
4040
expose:
@@ -49,7 +49,7 @@ services:
4949
etcd:
5050
container_name: etcd
5151
hostname: etcd
52-
build: centos-image
52+
build: fedora-image
5353
expose:
5454
- "2379"
5555
- "2380"
@@ -58,23 +58,23 @@ services:
5858
server1:
5959
container_name: server1
6060
hostname: server1
61-
build: centos-image
61+
build: fedora-image
6262
expose:
6363
- "22"
6464
command: ["/usr/sbin/sshd", "-Def", "/etc/ssh/sshd_config.server1"]
6565

6666
server2:
6767
container_name: server2
6868
hostname: server2
69-
build: centos-image
69+
build: fedora-image
7070
expose:
7171
- "22"
7272
command: ["/usr/sbin/sshd", "-Def", "/etc/ssh/sshd_config.server2"]
7373

7474
server3:
7575
container_name: server3
7676
hostname: server3
77-
build: centos-image
77+
build: fedora-image
7878
expose:
7979
- "22"
8080
command: ["/usr/sbin/sshd", "-Def", "/etc/ssh/sshd_config.server1"]

test/centos-image/Dockerfile renamed to test/fedora-image/Dockerfile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ RUN set -ex \
55
&& yum -y update \
66
&& yum -y install asciidoc etcd git golang hostname iproute make openssh-server rpm-build procps
77

8-
# Create centos, user1 and user2 users ; centos and user1 groups
8+
# Create fedora, user1 and user2 users ; fedora and user1 groups
99
RUN set -ex \
10-
&& useradd centos \
11-
&& install -d -m0755 -o centos -g centos /home/centos/.ssh \
10+
&& useradd fedora \
11+
&& install -d -m0755 -o fedora -g fedora /home/fedora/.ssh \
1212
&& useradd user1 \
1313
&& install -d -m0755 -o user1 -g user1 /home/user1/.ssh \
1414
&& useradd -g user1 user2 \
1515
&& install -d -m0755 -o user2 -g user1 /home/user2/.ssh
1616

17-
# Copy centos public key to root authorized_keys
17+
# Copy fedora public key to root authorized_keys
1818
RUN set -ex && install -d -m0700 /root/.ssh
1919
COPY ./ssh/id_ed25519.pub /root/.ssh/authorized_keys
2020
RUN chmod 0600 /root/.ssh/authorized_keys
@@ -25,10 +25,10 @@ RUN chmod 0644 /etc/ssh/ssh_config
2525
COPY ./ssh/ssh_host_ed25519_key* /etc/ssh/
2626
RUN chmod 0600 /etc/ssh/ssh_host_ed25519_key
2727

28-
# Copy centos ssh keys
29-
COPY --chown=centos:centos ./ssh/id_ed25519.pub /home/centos/.ssh/authorized_keys
30-
COPY --chown=centos:centos ./ssh/id_ed25519* ./ssh/known_hosts /home/centos/.ssh/
31-
RUN chmod 0600 /home/centos/.ssh/id_ed25519 /home/centos/.ssh/authorized_keys
28+
# Copy fedora ssh keys
29+
COPY --chown=fedora:fedora ./ssh/id_ed25519.pub /home/fedora/.ssh/authorized_keys
30+
COPY --chown=fedora:fedora ./ssh/id_ed25519* ./ssh/known_hosts /home/fedora/.ssh/
31+
RUN chmod 0600 /home/fedora/.ssh/id_ed25519 /home/fedora/.ssh/authorized_keys
3232

3333
# Copy user1 ssh keys
3434
COPY --chown=user1:user1 ./ssh/id_ed25519.pub /home/user1/.ssh/authorized_keys
@@ -56,4 +56,4 @@ COPY ./gateway.sh /root
5656
COPY ./etcd.sh /root
5757

5858
# Copy test file for tester
59-
COPY --chown=centos:centos ./sshproxy_test.go /home/centos/
59+
COPY --chown=fedora:fedora ./sshproxy_test.go /home/fedora/
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)