From f7d19b466e118cf2f6e322ab989fa3f91f5f8e2b Mon Sep 17 00:00:00 2001
From: licunlong <licunlong1@huawei.com>
Date: Mon, 3 Jul 2023 15:42:44 +0800
Subject: [PATCH] fix: rename config.service.toml to config.service

Now we don't need the file's extension be .toml, rename it. also delete config.service.toml
from our git repo
---
 coms/service/src/config.rs           |  2 +-
 coms/service/src/mng.rs              |  2 +-
 core/bin/unit/entry/config.rs        |  2 +-
 libs/libtests/src/lib.rs             |  2 +-
 tests/test_units/config.service.toml | 19 -------------------
 5 files changed, 4 insertions(+), 23 deletions(-)
 delete mode 100644 tests/test_units/config.service.toml

diff --git a/coms/service/src/config.rs b/coms/service/src/config.rs
index 3b7eb43..aa62b00 100644
--- a/coms/service/src/config.rs
+++ b/coms/service/src/config.rs
@@ -190,7 +190,7 @@ mod tests {
     #[test]
     fn test_service_parse() {
         let mut file_path = get_project_root().unwrap();
-        file_path.push("tests/test_units/config.service.toml");
+        file_path.push("tests/test_units/config.service");
 
         let paths = vec![file_path];
 
diff --git a/coms/service/src/mng.rs b/coms/service/src/mng.rs
index bfa2c9f..4bf20bd 100644
--- a/coms/service/src/mng.rs
+++ b/coms/service/src/mng.rs
@@ -2542,7 +2542,7 @@ mod tests {
 
     fn create_mng() -> (Rc<ServiceMng>, Rc<RunningData>, Rc<ServiceConfig>) {
         let mut file_path = get_project_root().unwrap();
-        file_path.push("tests/test_units/config.service.toml");
+        file_path.push("tests/test_units/config.service");
         let paths = vec![file_path];
 
         let comm = Rc::new(ServiceUnitComm::new());
diff --git a/core/bin/unit/entry/config.rs b/core/bin/unit/entry/config.rs
index 91313c4..ceead3c 100644
--- a/core/bin/unit/entry/config.rs
+++ b/core/bin/unit/entry/config.rs
@@ -204,7 +204,7 @@ mod tests {
     #[test]
     fn test_unit_parse() {
         let mut file_path = get_project_root().unwrap();
-        file_path.push("test_units/config.service.toml");
+        file_path.push("test_units/config.service");
 
         let mut builder = UeConfigData::builder().env();
         builder = builder.file(&file_path);
diff --git a/libs/libtests/src/lib.rs b/libs/libtests/src/lib.rs
index 260d7f8..c795fca 100644
--- a/libs/libtests/src/lib.rs
+++ b/libs/libtests/src/lib.rs
@@ -47,7 +47,7 @@ mod tests {
     #[test]
     fn test_get_project_root() {
         let mut file_path = get_project_root().unwrap();
-        file_path.push("tests/test_units/config.service.toml");
+        file_path.push("tests/test_units/config.service");
 
         println!("{file_path:?}");
         assert!(file_path.is_file())
diff --git a/tests/test_units/config.service.toml b/tests/test_units/config.service.toml
deleted file mode 100644
index 8c56508..0000000
--- a/tests/test_units/config.service.toml
+++ /dev/null
@@ -1,19 +0,0 @@
-[Unit]
-Description="CN"
-Documentation="192.168.1.1"
-Requires="test.service"
-
-[Service]
-Type="Simple"
-ExecCondition="/usr/bin/sleep 5"
-ExecStartPre="/usr/bin/echo test"
-ExecStart="/bin/echo 'test'"
-ExecStop="/bin/kill $MAINPID"
-WatchdogSec=10
-Restart="always"
-RestartPreventExitStatus="1 2 SIGKILL"
-RestartSec=5
-
-
-[Install]
-WantedBy="dbus.service"
-- 
2.33.0

