Skip to content

Commit 14083e8

Browse files
committed
test
1 parent e0a2068 commit 14083e8

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

pom.xml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.github.scouter-project</groupId>
88
<artifactId>scouter-plugin-server-alert-line</artifactId>
9-
<version>1.0-SNAPSHOT</version>
9+
<version>1.0.0</version>
1010

1111
<properties>
1212
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -119,6 +119,18 @@
119119
</execution>
120120
</executions>
121121
</plugin>
122+
<plugin>
123+
<groupId>org.apache.maven.plugins</groupId>
124+
<artifactId>maven-source-plugin</artifactId>
125+
<executions>
126+
<execution>
127+
<id>attach-sources</id>
128+
<goals>
129+
<goal>jar</goal>
130+
</goals>
131+
</execution>
132+
</executions>
133+
</plugin>
122134
</plugins>
123135
</build>
124136
</project>

src/test/java/scouter/plugin/server/alert/line/LinePluginTest.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,17 @@
1717
*/
1818
@RunWith(MockitoJUnitRunner.class)
1919
public class LinePluginTest {
20+
public final static String lineAccessToken = "Wd8jVkD5Fzh7CMl1CTmyOo9ILtWq1MoknQ7kbTMMjQmdU6+cDmfqkwwuE5mB5rLQcFeWCjvjJgnE/MmqT6D+gEsO68vKQh11YygUT7dQmh1JwmWG5mbRqk98Xo1+aBWHllG0AL/6xAp7YMtG9MDVPwdB04t89/1O/w1cDnyilFU=";
21+
public static final String lineGroupId = "C0246cfa665d99ec6dde3f12bec77eb4a";
22+
2023
@Mock Configure conf;
2124
@InjectMocks LinePlugin plugin = new LinePlugin();
2225

2326
@Test
2427
public void alert() throws Exception {
25-
when(conf.getValue("ext_plugin_line_access_token")).thenReturn("Wd8jVkD5Fzh7CMl1CTmyOo9ILtWq1MoknQ7kbTMMjQmdU6+cDmfqkwwuE5mB5rLQcFeWCjvjJgnE/MmqT6D+gEsO68vKQh11YygUT7dQmh1JwmWG5mbRqk98Xo1+aBWHllG0AL/6xAp7YMtG9MDVPwdB04t89/1O/w1cDnyilFU=");
26-
when(conf.getValue("ext_plugin_line_group_id")).thenReturn("C0246cfa665d99ec6dde3f12bec77eb4a");
28+
when(conf.getValue("ext_plugin_line_access_token")).thenReturn(lineAccessToken);
29+
when(conf.getValue("ext_plugin_line_group_id")).thenReturn(lineGroupId);
2730
when(conf.getBoolean(eq("ext_plugin_line_send_alert"), anyBoolean())).thenReturn(true);
28-
//when(conf.getBoolean("ext_plugin_line_send_alert", false)).thenReturn(true);
2931

3032
AlertPack ap = genAlertPack();
3133
plugin.alert(ap);

0 commit comments

Comments
 (0)