Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wrr-cat
apollo
提交
30bade80
apollo
项目概览
wrr-cat
/
apollo
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
apollo
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
30bade80
编写于
3月 12, 2016
作者:
Y
Yiming Liu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add portal test configuration
上级
69380224
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
52 addition
and
9 deletion
+52
-9
.gitignore
.gitignore
+5
-1
apollo-configserver/src/test/resources/data.sql
apollo-configserver/src/test/resources/data.sql
+0
-0
apollo-configserver/src/test/resources/schema.sql
apollo-configserver/src/test/resources/schema.sql
+0
-0
apollo-portal/src/main/java/com/ctrip/apollo/portal/controller/AppController.java
...ava/com/ctrip/apollo/portal/controller/AppController.java
+3
-7
apollo-portal/src/test/java/com/ctrip/apollo/portal/PortalApplicationTestConfiguration.java
...rip/apollo/portal/PortalApplicationTestConfiguration.java
+8
-0
apollo-portal/src/test/java/com/ctrip/apollo/portal/repository/AppRepositoryTest.java
...com/ctrip/apollo/portal/repository/AppRepositoryTest.java
+35
-0
apollo-portal/src/test/resources/data.sql
apollo-portal/src/test/resources/data.sql
+0
-0
apollo-portal/src/test/resources/schema.sql
apollo-portal/src/test/resources/schema.sql
+0
-0
pom.xml
pom.xml
+1
-1
未找到文件。
.gitignore
浏览文件 @
30bade80
...
@@ -11,8 +11,12 @@
...
@@ -11,8 +11,12 @@
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
hs_err_pid*
# Eclipse
.classpath
.classpath
.project
.project
target
target
.settings
.settings
# Idea
.idea
*.iml
\ No newline at end of file
apollo-configserver/src/test/resources/data.sql
已删除
100644 → 0
浏览文件 @
69380224
apollo-configserver/src/test/resources/schema.sql
已删除
100644 → 0
浏览文件 @
69380224
apollo-portal/src/main/java/com/ctrip/apollo/portal/controller/AppController.java
浏览文件 @
30bade80
...
@@ -26,12 +26,8 @@ public class AppController {
...
@@ -26,12 +26,8 @@ public class AppController {
}
}
@RequestMapping
(
value
=
""
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
""
,
method
=
RequestMethod
.
POST
)
public
App
create
()
{
public
App
create
(
App
app
)
{
App
ramdomApp
=
new
App
();
app
.
setCreateTimestamp
(
new
Date
());
ramdomApp
.
setId
(
String
.
valueOf
(
System
.
currentTimeMillis
()));
return
appRepository
.
save
(
app
);
ramdomApp
.
setName
(
"new app "
+
System
.
currentTimeMillis
());
ramdomApp
.
setOwner
(
"owner "
+
System
.
currentTimeMillis
());
ramdomApp
.
setCreateTimestamp
(
new
Date
());
return
appRepository
.
save
(
ramdomApp
);
}
}
}
}
apollo-portal/src/test/java/com/ctrip/apollo/portal/PortalApplicationTestConfiguration.java
0 → 100644
浏览文件 @
30bade80
package
com.ctrip.apollo.portal
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
@SpringBootApplication
public
class
PortalApplicationTestConfiguration
{
}
apollo-portal/src/test/java/com/ctrip/apollo/portal/repository/AppRepositoryTest.java
0 → 100644
浏览文件 @
30bade80
package
com.ctrip.apollo.portal.repository
;
import
java.util.Date
;
import
org.junit.Assert
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.test.SpringApplicationConfiguration
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
com.ctrip.apollo.portal.PortalApplicationTestConfiguration
;
import
com.ctrip.apollo.portal.entities.App
;
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@SpringApplicationConfiguration
(
classes
=
PortalApplicationTestConfiguration
.
class
)
public
class
AppRepositoryTest
{
@Autowired
AppRepository
repository
;
@Test
public
void
testCreate
()
{
Assert
.
assertEquals
(
0
,
repository
.
count
());
App
ramdomApp
=
new
App
();
ramdomApp
.
setId
(
String
.
valueOf
(
System
.
currentTimeMillis
()));
ramdomApp
.
setName
(
"new app "
+
System
.
currentTimeMillis
());
ramdomApp
.
setOwner
(
"owner "
+
System
.
currentTimeMillis
());
ramdomApp
.
setCreateTimestamp
(
new
Date
());
repository
.
save
(
ramdomApp
);
Assert
.
assertEquals
(
1
,
repository
.
count
());
}
}
apollo-portal/src/test/resources/data.sql
已删除
100644 → 0
浏览文件 @
69380224
apollo-portal/src/test/resources/schema.sql
已删除
100644 → 0
浏览文件 @
69380224
pom.xml
浏览文件 @
30bade80
...
@@ -99,7 +99,7 @@
...
@@ -99,7 +99,7 @@
<plugin>
<plugin>
<groupId>
org.eluder.coveralls
</groupId>
<groupId>
org.eluder.coveralls
</groupId>
<artifactId>
coveralls-maven-plugin
</artifactId>
<artifactId>
coveralls-maven-plugin
</artifactId>
<version>
3
.1.0
</version>
<version>
4
.1.0
</version>
</plugin>
</plugin>
</plugins>
</plugins>
</build>
</build>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录