File tree Expand file tree Collapse file tree 2 files changed +18
-4
lines changed
src/test/java/scouter/plugin/server/alert/line Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change 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>
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 >
Original file line number Diff line number Diff line change 1717 */
1818@ RunWith (MockitoJUnitRunner .class )
1919public 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 );
You can’t perform that action at this time.
0 commit comments