refactor:修改client/unittest目录名为client/dign_client

This commit is contained in:
fumingwei
2021-09-02 11:52:54 +08:00
parent 1e16fd860e
commit df87cf779f
9 changed files with 12 additions and 12 deletions

View File

@@ -12,7 +12,7 @@ cache:
before_script:
- docker info
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- chmod 0755 ./images_build/client/unittest/bin/wait-for
- chmod 0755 ./images_build/client/dign_client/bin/wait-for
- chmod 0755 ./images_build/server_web/certs/tool
tags:
- share

View File

@@ -22,7 +22,7 @@ set(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/cmake/PreunInstall.i
set(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/cmake/PostunInstall.in)
install(FILES compose/docker-compose.yml DESTINATION ./compose)
install(FILES images_build/client/unittest/etc/client.conf DESTINATION ./etc)
install(FILES images_build/client/dign_client/etc/client.conf DESTINATION ./etc)
install(FILES service/tsg-diagnose.service DESTINATION /usr/lib/systemd/system)
install(FILES images_build/server_dns/config/dnsmasq.conf DESTINATION /opt/tsg/tsg-diagnose/etc/)
install(DIRECTORY images/ DESTINATION ./images)

View File

@@ -71,21 +71,21 @@ services:
- /bin/sh
- -c
- |
/root/unittest/bin/wait-for 192.51.100.2:443 -t 60 -- echo "server web is up"
/root/unittest/bin/wait-for 192.51.100.5:8080 -t 60 -- echo "server dns is up"
/root/dign_client/bin/wait-for 192.51.100.2:443 -t 60 -- echo "server web is up"
/root/dign_client/bin/wait-for 192.51.100.5:8080 -t 60 -- echo "server dns is up"
ifconfig eth0 hw ether 02:42:C0:A8:FD:03
arp -i eth0 -s 192.0.2.130 02:42:c0:a8:fd:82
arp -i eth0 -s 192.0.2.131 02:42:C0:A8:FD:83
arp -i eth0 -s 192.0.2.135 02:42:C0:A8:FD:85
mkdir -p /root/result_tsg_diagnose/unittest
mkdir -p /root/result_tsg_diagnose/dign_client
mkdir -p /root/result_tsg_diagnose/conn_traffic_status
cp -rf /root/cafile_dict/certs/sets/current/gen/crt/ca-root.crt /usr/local/share/ca-certificates
update-ca-certificates
cat /root/unittest/etc/hosts >> /etc/hosts
echo '0 2 * * * /usr/local/bin/python /root/unittest/clear_file_timeout.py' > /etc/crontabs/root
echo '0 2 * * * /usr/local/bin/python /root/unittest/clear_file_timeout.py -d /root/result_tsg_diagnose/conn_traffic_status' > /etc/crontabs/root
cat /root/dign_client/etc/hosts >> /etc/hosts
echo '0 2 * * * /usr/local/bin/python /root/dign_client/clear_file_timeout.py' > /etc/crontabs/root
echo '0 2 * * * /usr/local/bin/python /root/dign_client/clear_file_timeout.py -d /root/result_tsg_diagnose/conn_traffic_status' > /etc/crontabs/root
crond
python /root/unittest/tsg_diagnose.py -l -w NEZHA
python /root/dign_client/tsg_diagnose.py -l -w NEZHA
tail -f /dev/null

View File

@@ -2,7 +2,7 @@
FROM python:3.6.9-alpine3.10
ADD unittest /root/unittest
ADD dign_client /root/dign_client
RUN sed -i s@/dl-cdn.alpinelinux.org/@/mirrors.ustc.edu.cn/@g /etc/apk/repositories \
&& apk update \
@@ -13,6 +13,6 @@ RUN sed -i s@/dl-cdn.alpinelinux.org/@/mirrors.ustc.edu.cn/@g /etc/apk/repositor
&& pip3 install pytelegraf \
&& pip3 install dnspython
WORKDIR /root/unittest
WORKDIR /root/dign_client
CMD tail -f /dev/null

View File

@@ -7,7 +7,7 @@ import argparse
def get_suite_option():
parser = argparse.ArgumentParser(description="Tsg diagnose Tools - clear tsg diagnose result file", epilog = "Example:help")
parser.add_argument('-t','--timeout', type = int, default = 604800,help='Specify the time to delete files that are not accessed in seconds ,the default is 604800 (7 days)')
parser.add_argument('-d','--dictpath', type = str, default = '/root/result_tsg_diagnose/unittest', help='Specify the folder to delete files, the default is /root/result_tsg_diagnose/unittest')
parser.add_argument('-d','--dictpath', type = str, default = '/root/result_tsg_diagnose/dign_client', help='Specify the folder to delete files, the default is /root/result_tsg_diagnose/dign_client')
args = parser.parse_args()
return args