Compare commits
No commits in common. "master" and "yystopf-patch-1" have entirely different histories.
master
...
yystopf-pa
|
|
@ -0,0 +1,26 @@
|
|||
name: hello_chy
|
||||
description: ""
|
||||
global:
|
||||
concurrent: false
|
||||
workflow:
|
||||
- ref: start
|
||||
name: 开始
|
||||
task: start
|
||||
- ref: dingtalk_notice_action_card_0
|
||||
name: 钉钉通知-ActionCard
|
||||
task: dingtalk_notice_action_card@1.0.2
|
||||
input:
|
||||
boot_webhook_url: ((wecom.bot_webhook))
|
||||
msg_title: '""'
|
||||
msg_text: '"这是来自chy的测试"'
|
||||
single_title: '""'
|
||||
single_url: '""'
|
||||
btns: '"[]"'
|
||||
needs:
|
||||
- start
|
||||
- ref: end
|
||||
name: 结束
|
||||
task: end
|
||||
needs:
|
||||
- dingtalk_notice_action_card_0
|
||||
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
name: hello_dingdingtalk
|
||||
description: ""
|
||||
global:
|
||||
concurrent: false
|
||||
workflow:
|
||||
- ref: start
|
||||
name: 开始
|
||||
task: start
|
||||
- ref: dingtalk_notice_action_card_0
|
||||
name: 钉钉通知-ActionCard
|
||||
task: dingtalk_notice_action_card@1.0.2
|
||||
input:
|
||||
boot_webhook_url: ((wecom.bot_webhook))
|
||||
msg_title: '"hello"'
|
||||
msg_text: '"this is a test message"'
|
||||
single_title: '""'
|
||||
single_url: '""'
|
||||
btns: '"[]"'
|
||||
needs:
|
||||
- start
|
||||
- ref: end
|
||||
name: 结束
|
||||
task: end
|
||||
needs:
|
||||
- dingtalk_notice_action_card_0
|
||||
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
name: hello_world
|
||||
description: 建木快速入门,从hello world开始!
|
||||
|
||||
trigger:
|
||||
type: cron
|
||||
schedule: 0 0/30 * * * ?
|
||||
|
||||
workflow:
|
||||
start:
|
||||
type: start
|
||||
targets:
|
||||
- sayhello
|
||||
sayhello:
|
||||
type: qywx_notice:1.2.1
|
||||
param:
|
||||
bot_webhook_url: "((wecom.bot_webhook))"
|
||||
text_content: "这是来自建木的第一个问候!"
|
||||
sources:
|
||||
- start
|
||||
targets:
|
||||
- end
|
||||
end:
|
||||
type: end
|
||||
sources:
|
||||
- sayhello
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
name: test git log
|
||||
description: ""
|
||||
global:
|
||||
concurrent: false
|
||||
workflow:
|
||||
- ref: start
|
||||
name: 开始
|
||||
task: start
|
||||
- ref: git_clone_0
|
||||
name: git clone
|
||||
task: git_clone@1.2.5
|
||||
input:
|
||||
remote_url: '"https://gitee.com/jianmu-dev/jianmu-ci-server.git"'
|
||||
ref: '"refs/heads/master"'
|
||||
commit_id: '""'
|
||||
depth: 3
|
||||
needs:
|
||||
- start
|
||||
- ref: git_log_0
|
||||
name: git log
|
||||
task: git_log@1.0.2
|
||||
input:
|
||||
git_path: git_clone_0.git_path
|
||||
commit_num: 5
|
||||
needs:
|
||||
- git_clone_0
|
||||
- ref: end
|
||||
name: 结束
|
||||
task: end
|
||||
needs:
|
||||
- git_log_0
|
||||
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
name: wechat
|
||||
description: ""
|
||||
global:
|
||||
concurrent: false
|
||||
workflow:
|
||||
- ref: start
|
||||
name: 开始
|
||||
task: start
|
||||
- ref: dingtalk_notice_action_card_0
|
||||
name: 钉钉通知-ActionCard
|
||||
task: dingtalk_notice_action_card@1.0.2
|
||||
input:
|
||||
boot_webhook_url: ((wechat.wechat_bot))
|
||||
msg_title: 'aaaaaa'
|
||||
msg_text: '"eeeeeee"'
|
||||
single_title: '""'
|
||||
single_url: '""'
|
||||
btns: '"[]"'
|
||||
needs:
|
||||
- start
|
||||
- ref: end
|
||||
name: 结束
|
||||
task: end
|
||||
needs:
|
||||
- dingtalk_notice_action_card_0
|
||||
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
name: 仓库开发者克隆私有仓库
|
||||
description: ""
|
||||
global:
|
||||
concurrent: false
|
||||
trigger:
|
||||
type: cron
|
||||
schedule: 0 30 14 * * ?
|
||||
workflow:
|
||||
- ref: start
|
||||
name: 开始
|
||||
task: start
|
||||
- ref: end
|
||||
name: 结束
|
||||
task: end
|
||||
needs:
|
||||
- dingtalk_notice_action_card_0
|
||||
- ref: git_clone_0
|
||||
name: git clone
|
||||
task: git_clone@1.2.5
|
||||
input:
|
||||
username: ((chytest3.user))
|
||||
password: ((chytest3.pwd))
|
||||
remote_url: '"hhttps://testgitea2.trustie.net/postman/test_jiammu.git"'
|
||||
ref: '"refs/heads/master"'
|
||||
commit_id: '""'
|
||||
depth: 100
|
||||
needs:
|
||||
- start
|
||||
- ref: git_log_0
|
||||
name: git log
|
||||
task: git_log@1.0.2
|
||||
input:
|
||||
git_path: git_clone_0.git_path
|
||||
commit_num: 5
|
||||
needs:
|
||||
- git_clone_0
|
||||
- ref: dingtalk_notice_action_card_0
|
||||
name: 钉钉通知-ActionCard
|
||||
task: dingtalk_notice_action_card@1.0.2
|
||||
input:
|
||||
boot_webhook_url: ((wecom.bot_webhook))
|
||||
msg_title: '""'
|
||||
msg_text: git_log_0.git_log
|
||||
single_title: '""'
|
||||
single_url: '""'
|
||||
btns: '"[]"'
|
||||
needs:
|
||||
- git_log_0
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
name: 仓库推送代码
|
||||
description: ""
|
||||
global:
|
||||
concurrent: false
|
||||
workflow:
|
||||
- ref: start
|
||||
name: 开始
|
||||
task: start
|
||||
- ref: git_push_0
|
||||
name: git push
|
||||
task: git_push@1.0.6
|
||||
input:
|
||||
username: ((testgitea.user))
|
||||
password: ((testgitea.pwd))
|
||||
remote_url: '"https://testgitea2.trustie.net/gitgit/testdevops.git"'
|
||||
remote_branch: '"master"'
|
||||
source_path: '""'
|
||||
target_dir: '"/."'
|
||||
commit_message: '"jianmu default commit message"'
|
||||
committer_name: '"jianmu"'
|
||||
committer_email: '"jianmu@example.com"'
|
||||
needs:
|
||||
- start
|
||||
- ref: end
|
||||
name: 结束
|
||||
task: end
|
||||
needs:
|
||||
- git_push_0
|
||||
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
name: 克隆项目,获取项目的log,向企业微信/钉钉发送消息
|
||||
description: |-
|
||||
1. 第一步:克隆项目,指定commit id
|
||||
2. 第二步:获取克隆项目的指定次数的commit log
|
||||
3. 第三步:同时向钉钉/企业微信发送git_log
|
||||
global:
|
||||
concurrent: false
|
||||
workflow:
|
||||
- ref: start
|
||||
name: 开始
|
||||
task: start
|
||||
- ref: git_clone_0
|
||||
name: git clone
|
||||
task: git_clone@1.2.4
|
||||
input:
|
||||
username: ((testgitea.user))
|
||||
password: ((testgitea.pwd))
|
||||
remote_url: '"https://testgitea2.trustie.net/gitgit/testdevops.git"'
|
||||
ref: '"refs/heads/master"'
|
||||
commit_id: '"c3e9c6bb1e"'
|
||||
needs:
|
||||
- start
|
||||
- ref: end
|
||||
name: 结束
|
||||
task: end
|
||||
needs:
|
||||
- dingtalk_notice_action_card_0
|
||||
- qywx_notice_0
|
||||
- ref: git_log_0
|
||||
name: git log
|
||||
task: git_log@1.0.2
|
||||
input:
|
||||
git_path: git_clone_0.git_path
|
||||
commit_num: 5
|
||||
needs:
|
||||
- git_clone_0
|
||||
- ref: dingtalk_notice_action_card_0
|
||||
name: 钉钉通知-ActionCard
|
||||
task: dingtalk_notice_action_card@1.0.2
|
||||
input:
|
||||
boot_webhook_url: ((wecom.bot_webhook))
|
||||
msg_title: '"gitlog"'
|
||||
msg_text: git_log_0.git_log
|
||||
single_title: '""'
|
||||
single_url: '""'
|
||||
btns: '"[]"'
|
||||
needs:
|
||||
- git_log_0
|
||||
- ref: qywx_notice_0
|
||||
name: 企业微信通知
|
||||
task: qywx_notice@1.2.1-text
|
||||
input:
|
||||
bot_webhook_url: ((wechat.wechat_bot))
|
||||
text_content: git_log_0.git_log
|
||||
mentioned_list: '"[]"'
|
||||
mentioned_mobile_list: '"[]"'
|
||||
needs:
|
||||
- git_log_0
|
||||
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
name: 克隆项目并获取项目的log2222
|
||||
description: ""
|
||||
global:
|
||||
concurrent: false
|
||||
workflow:
|
||||
- ref: start
|
||||
name: 开始
|
||||
task: start
|
||||
- ref: git_clone_0
|
||||
name: git clone
|
||||
task: git_clone@1.2.4
|
||||
input:
|
||||
username: ((testgitea.user))
|
||||
password: ((testgitea.pwd))
|
||||
remote_url: "https://testgitea2.trustie.net/gitgit/testdevops.git"
|
||||
ref: '"refs/heads/master"'
|
||||
commit_id: '""'
|
||||
needs:
|
||||
- start
|
||||
- ref: end
|
||||
name: 结束
|
||||
task: end
|
||||
needs:
|
||||
- git_clone_0
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
name: 向钉钉发送hello
|
||||
description: ""
|
||||
global:
|
||||
concurrent: false
|
||||
workflow:
|
||||
- ref: start
|
||||
name: 开始
|
||||
task: start
|
||||
- ref: dingtalk_notice_action_card_0
|
||||
name: 钉钉通知-ActionCard
|
||||
task: dingtalk_notice_action_card@1.0.2
|
||||
input:
|
||||
boot_webhook_url: ((wecom.bot_webhook))
|
||||
msg_title: '"hello"'
|
||||
msg_text: '"hello chy 0802"'
|
||||
single_title: '""'
|
||||
single_url: '""'
|
||||
btns: '"[]"'
|
||||
needs:
|
||||
- start
|
||||
- ref: end
|
||||
name: 结束
|
||||
task: end
|
||||
needs:
|
||||
- dingtalk_notice_action_card_0
|
||||
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
name: 定时器的试验
|
||||
description: ""
|
||||
global:
|
||||
concurrent: false
|
||||
trigger:
|
||||
type: cron
|
||||
schedule: 0 16 09 * * ?
|
||||
workflow:
|
||||
- ref: start
|
||||
name: 开始
|
||||
task: start
|
||||
- ref: git_clone_0
|
||||
name: git clone
|
||||
task: git_clone@1.2.5
|
||||
input:
|
||||
username: ((testgitea.user))
|
||||
password: ((testgitea.pwd))
|
||||
remote_url: '"https://testgitea2.trustie.net/gitgit/MiniCanvas.git"'
|
||||
ref: '"refs/heads/master"'
|
||||
commit_id: '""'
|
||||
depth: 100
|
||||
needs:
|
||||
- start
|
||||
- ref: git_log_0
|
||||
name: git log
|
||||
task: git_log@1.0.2
|
||||
input:
|
||||
git_path: git_clone_0.git_path
|
||||
commit_num: 10
|
||||
needs:
|
||||
- git_clone_0
|
||||
- ref: end
|
||||
name: 结束
|
||||
task: end
|
||||
needs:
|
||||
- git_log_0
|
||||
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
name: 开发者clone私有仓库
|
||||
description: ""
|
||||
global:
|
||||
concurrent: false
|
||||
workflow:
|
||||
- ref: start
|
||||
name: 开始
|
||||
task: start
|
||||
- ref: git_clone_0
|
||||
name: git clone
|
||||
task: git_clone@1.2.5
|
||||
input:
|
||||
username: ((chytest3.user))
|
||||
password: ((chytest3.pwd))
|
||||
remote_url: '"https://testgitea2.trustie.net/postman/test_jiammu.git"'
|
||||
ref: '"refs/heads/master"'
|
||||
commit_id: '""'
|
||||
depth: 100
|
||||
needs:
|
||||
- start
|
||||
- ref: end
|
||||
name: 结束
|
||||
task: end
|
||||
needs:
|
||||
- git_clone_0
|
||||
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
name: 未命名项目111111111111111111111111111111111111111111111111111111111111111111111
|
||||
description: ""
|
||||
global:
|
||||
concurrent: false
|
||||
workflow:
|
||||
- ref: start
|
||||
name: 开始
|
||||
task: start
|
||||
- ref: dingtalk_notice_action_card_0
|
||||
name: 钉钉通知-ActionCard
|
||||
task: dingtalk_notice_action_card@1.0.2
|
||||
input:
|
||||
boot_webhook_url: ((wecom.bot_webhook))
|
||||
msg_title: '"hello"'
|
||||
msg_text: '"this is a test message"'
|
||||
single_title: '""'
|
||||
single_url: '""'
|
||||
btns: '"[]"'
|
||||
needs:
|
||||
- start
|
||||
- ref: end
|
||||
name: 结束
|
||||
task: end
|
||||
needs:
|
||||
- dingtalk_notice_action_card_0
|
||||
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
name: 未命名项目111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
|
||||
description: ""
|
||||
global:
|
||||
concurrent: false
|
||||
workflow:
|
||||
- ref: start
|
||||
name: 开始
|
||||
task: start
|
||||
- ref: dingtalk_notice_action_card_0
|
||||
name: 钉钉通知-ActionCard
|
||||
task: dingtalk_notice_action_card@1.0.2
|
||||
input:
|
||||
boot_webhook_url: ((wecom.bot_webhook))
|
||||
msg_title: '"hello"'
|
||||
msg_text: '"this is a test message"'
|
||||
single_title: '""'
|
||||
single_url: '""'
|
||||
btns: '"[]"'
|
||||
needs:
|
||||
- start
|
||||
- ref: end
|
||||
name: 结束
|
||||
task: end
|
||||
needs:
|
||||
- dingtalk_notice_action_card_0
|
||||
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
name: 管理者clone私有仓库
|
||||
description: ""
|
||||
global:
|
||||
concurrent: false
|
||||
workflow:
|
||||
- ref: start
|
||||
name: 开始
|
||||
task: start
|
||||
- ref: git_clone_0
|
||||
name: git clone
|
||||
task: git_clone@1.2.5
|
||||
input:
|
||||
username: ((postman.user))
|
||||
password: ((postman.pwd))
|
||||
remote_url: '"https://testgitea2.trustie.net/postman/test_jiammu.git"'
|
||||
ref: '"refs/heads/master"'
|
||||
commit_id: '""'
|
||||
depth: 100
|
||||
needs:
|
||||
- start
|
||||
- ref: end
|
||||
name: 结束
|
||||
task: end
|
||||
needs:
|
||||
- git_clone_0
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
name: 组织ownerclone私有仓库
|
||||
description: ""
|
||||
global:
|
||||
concurrent: false
|
||||
workflow:
|
||||
- ref: start
|
||||
name: 开始
|
||||
task: start
|
||||
- ref: git_clone_0
|
||||
name: git clone
|
||||
task: git_clone@1.2.5
|
||||
input:
|
||||
username: ((postman.user))
|
||||
password: ((postman.pwd))
|
||||
remote_url: '"https://testgitea2.trustie.net/test_jianmu_team/bot.git"'
|
||||
ref: '"refs/heads/master"'
|
||||
commit_id: '""'
|
||||
depth: 100
|
||||
needs:
|
||||
- start
|
||||
- ref: end
|
||||
name: 结束
|
||||
task: end
|
||||
needs:
|
||||
- git_clone_0
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
name: 组织报告者clone私有仓库
|
||||
description: ""
|
||||
global:
|
||||
concurrent: false
|
||||
workflow:
|
||||
- ref: start
|
||||
name: 开始
|
||||
task: start
|
||||
- ref: git_clone_0
|
||||
name: git clone
|
||||
task: git_clone@1.2.5
|
||||
input:
|
||||
username: ((chytest3.user))
|
||||
password: ((chytest3.pwd))
|
||||
remote_url: '"https://testgitea2.trustie.net/test_jianmu_team/bot.git"'
|
||||
ref: '"refs/heads/master"'
|
||||
commit_id: '""'
|
||||
depth: 100
|
||||
needs:
|
||||
- start
|
||||
- ref: end
|
||||
name: 结束
|
||||
task: end
|
||||
needs:
|
||||
- git_clone_0
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
name: 给企业微信发送hello
|
||||
description: ""
|
||||
global:
|
||||
concurrent: false
|
||||
workflow:
|
||||
- ref: start
|
||||
name: 开始
|
||||
task: start
|
||||
- ref: qywx_notice_0
|
||||
name: 企业微信通知
|
||||
task: qywx_notice@1.2.1-text
|
||||
input:
|
||||
bot_webhook_url: ((wechat.wechat_bot))
|
||||
text_content: '"hello this is message"'
|
||||
mentioned_list: '"[]"'
|
||||
mentioned_mobile_list: '"[]"'
|
||||
needs:
|
||||
- start
|
||||
- ref: end
|
||||
name: 结束
|
||||
task: end
|
||||
needs:
|
||||
- qywx_notice_0
|
||||
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
version: 2
|
||||
name: 项目有推送发送钉钉消息
|
||||
description: ""
|
||||
global:
|
||||
concurrent: false
|
||||
trigger:
|
||||
webhook: gitlink@1.0.0
|
||||
event:
|
||||
- ref: push
|
||||
ruleset:
|
||||
- param-ref: branch
|
||||
operator: INCLUDE
|
||||
value: '"master"'
|
||||
ruleset-operator: AND
|
||||
workflow:
|
||||
- ref: dingtalk_notice_action_card_0
|
||||
name: 钉钉通知-ActionCard
|
||||
task: dingtalk_notice_action_card@1.0.2
|
||||
input:
|
||||
boot_webhook_url: ((wecom.bot_webhook))
|
||||
msg_title: '"push"'
|
||||
msg_text: '"hello views有代码提交啦"'
|
||||
single_title: '""'
|
||||
single_url: '""'
|
||||
btns: '"[]"'
|
||||
needs:
|
||||
- start
|
||||
- ref: start
|
||||
name: 开始
|
||||
task: start
|
||||
- ref: end
|
||||
name: 结束
|
||||
task: end
|
||||
needs:
|
||||
- dingtalk_notice_action_card_0
|
||||
|
||||
|
|
@ -0,0 +1,135 @@
|
|||
# To learn more about .editorconfig see https://aka.ms/editorconfigdocs
|
||||
###############################
|
||||
# Core EditorConfig Options #
|
||||
###############################
|
||||
root=true
|
||||
# All files
|
||||
[*]
|
||||
indent_style = space
|
||||
# shell files
|
||||
[*.{cmd,sh,bat}]
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
# Code files
|
||||
[*.{cs,csx,vb,vbx}]
|
||||
indent_size = 4
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
charset = utf-8-bom
|
||||
[*.{json,yml,xml,csproj,props}]
|
||||
indent_size = 2
|
||||
###############################
|
||||
# .NET Coding Conventions #
|
||||
###############################
|
||||
[*.{cs,vb}]
|
||||
# Organize usings
|
||||
dotnet_sort_system_directives_first = false
|
||||
# this. preferences
|
||||
dotnet_style_qualification_for_field = false:silent
|
||||
dotnet_style_qualification_for_property = false:silent
|
||||
dotnet_style_qualification_for_method = false:silent
|
||||
dotnet_style_qualification_for_event = false:silent
|
||||
# Language keywords vs BCL types preferences
|
||||
dotnet_style_predefined_type_for_locals_parameters_members = true:silent
|
||||
dotnet_style_predefined_type_for_member_access = true:silent
|
||||
# Parentheses preferences
|
||||
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
|
||||
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
|
||||
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
|
||||
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
|
||||
# Modifier preferences
|
||||
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
|
||||
dotnet_style_readonly_field = true:suggestion
|
||||
# Expression-level preferences
|
||||
dotnet_style_object_initializer = true:suggestion
|
||||
dotnet_style_collection_initializer = true:suggestion
|
||||
dotnet_style_explicit_tuple_names = true:suggestion
|
||||
dotnet_style_null_propagation = true:suggestion
|
||||
dotnet_style_coalesce_expression = true:suggestion
|
||||
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:silent
|
||||
dotnet_prefer_inferred_tuple_names = true:suggestion
|
||||
dotnet_prefer_inferred_anonymous_type_member_names = true:suggestion
|
||||
dotnet_style_prefer_auto_properties = true:silent
|
||||
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
|
||||
dotnet_style_prefer_conditional_expression_over_return = true:silent
|
||||
###############################
|
||||
# Naming Conventions #
|
||||
###############################
|
||||
# Style Definitions
|
||||
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
|
||||
# Use PascalCase for constant fields
|
||||
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
|
||||
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
|
||||
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
|
||||
dotnet_naming_symbols.constant_fields.applicable_kinds = field
|
||||
dotnet_naming_symbols.constant_fields.applicable_accessibilities = *
|
||||
dotnet_naming_symbols.constant_fields.required_modifiers = const
|
||||
###############################
|
||||
# C# Coding Conventions #
|
||||
###############################
|
||||
[*.cs]
|
||||
# var preferences
|
||||
csharp_style_var_for_built_in_types = true:silent
|
||||
csharp_style_var_when_type_is_apparent = true:silent
|
||||
csharp_style_var_elsewhere = true:silent
|
||||
# Expression-bodied members
|
||||
csharp_style_expression_bodied_methods = false:silent
|
||||
csharp_style_expression_bodied_constructors = false:silent
|
||||
csharp_style_expression_bodied_operators = false:silent
|
||||
csharp_style_expression_bodied_properties = true:silent
|
||||
csharp_style_expression_bodied_indexers = true:silent
|
||||
csharp_style_expression_bodied_accessors = true:silent
|
||||
# Pattern matching preferences
|
||||
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
|
||||
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
|
||||
# Null-checking preferences
|
||||
csharp_style_throw_expression = true:suggestion
|
||||
csharp_style_conditional_delegate_call = true:suggestion
|
||||
# Modifier preferences
|
||||
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
|
||||
# Expression-level preferences
|
||||
csharp_prefer_braces = true:silent
|
||||
csharp_style_deconstructed_variable_declaration = true:suggestion
|
||||
csharp_prefer_simple_default_expression = true:suggestion
|
||||
csharp_style_pattern_local_over_anonymous_function = true:suggestion
|
||||
csharp_style_inlined_variable_declaration = true:suggestion
|
||||
###############################
|
||||
# C# Formatting Rules #
|
||||
###############################
|
||||
# New line preferences
|
||||
csharp_new_line_before_open_brace = all
|
||||
csharp_new_line_before_else = true
|
||||
csharp_new_line_before_catch = true
|
||||
csharp_new_line_before_finally = true
|
||||
csharp_new_line_before_members_in_object_initializers = true
|
||||
csharp_new_line_before_members_in_anonymous_types = true
|
||||
csharp_new_line_between_query_expression_clauses = true
|
||||
# Indentation preferences
|
||||
csharp_indent_case_contents = true
|
||||
csharp_indent_switch_labels = true
|
||||
csharp_indent_labels = flush_left
|
||||
# Space preferences
|
||||
csharp_space_after_cast = false
|
||||
csharp_space_after_keywords_in_control_flow_statements = true
|
||||
csharp_space_between_method_call_parameter_list_parentheses = false
|
||||
csharp_space_between_method_declaration_parameter_list_parentheses = false
|
||||
csharp_space_between_parentheses = false
|
||||
csharp_space_before_colon_in_inheritance_clause = true
|
||||
csharp_space_after_colon_in_inheritance_clause = true
|
||||
csharp_space_around_binary_operators = before_and_after
|
||||
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
|
||||
csharp_space_between_method_call_name_and_opening_parenthesis = false
|
||||
csharp_space_between_method_call_empty_parameter_list_parentheses = false
|
||||
# Wrapping preferences
|
||||
csharp_preserve_single_line_statements = true
|
||||
csharp_preserve_single_line_blocks = true
|
||||
csharp_style_namespace_declarations=file_scoped:silent
|
||||
###############################
|
||||
# VB Coding Conventions #
|
||||
###############################
|
||||
[*.vb]
|
||||
# Modifier preferences
|
||||
visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async:suggestion
|
||||
[*.cs]
|
||||
# Add file header
|
||||
file_header_template = Copyright (c) Argo Zhang (argo@163.com). All rights reserved.\nLicensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.\nWebsite: https://admin.blazor.zone
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
name: Gitea Actions Demo
|
||||
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
Explore-Gitea-Actions:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
|
||||
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
|
||||
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
|
||||
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
|
||||
- name: List files in the repository
|
||||
run: |
|
||||
ls ${{ gitea.workspace }}
|
||||
- run: echo "🍏 This job's status is ${{ job.status }}."
|
||||
|
|
@ -1 +0,0 @@
|
|||
ceshi
|
||||
Binary file not shown.
BIN
32imag2.png
BIN
32imag2.png
Binary file not shown.
|
Before Width: | Height: | Size: 17 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 17 KiB |
BIN
32image.png
BIN
32image.png
Binary file not shown.
|
Before Width: | Height: | Size: 17 KiB |
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"solution": {
|
||||
"path": "BootstrapAdmin.sln",
|
||||
"projects": [
|
||||
"src\\blazor\\admin\\BootstrapAdmin.Caching\\BootstrapAdmin.Caching.csproj",
|
||||
"src\\blazor\\admin\\BootstrapAdmin.DataAccess.Models\\BootstrapAdmin.DataAccess.Models.csproj",
|
||||
"src\\blazor\\admin\\BootstrapAdmin.DataAccess.PetaPoco\\BootstrapAdmin.DataAccess.PetaPoco.csproj",
|
||||
"src\\blazor\\admin\\BootstrapAdmin.Web.Core\\BootstrapAdmin.Web.Core.csproj",
|
||||
"src\\blazor\\admin\\BootstrapAdmin.Web\\BootstrapAdmin.Web.csproj",
|
||||
"src\\blazor\\client\\BootstrapClient.DataAccess\\BootstrapClient.DataAccess.PetaPoco.csproj",
|
||||
"src\\blazor\\client\\BootstrapClient.Shared\\BootstrapClient.Web.Shared.csproj",
|
||||
"src\\blazor\\client\\BootstrapClient.Web.Core\\BootstrapClient.Web.Core.csproj",
|
||||
"src\\blazor\\client\\BootstrapClient.Web.Models\\BootstrapClient.DataAccess.Models.csproj",
|
||||
"src\\blazor\\client\\BootstrapClient.Web\\BootstrapClient.Web.csproj",
|
||||
"src\\mvc\\admin\\Bootstrap.Admin\\Bootstrap.Admin.csproj",
|
||||
"src\\mvc\\admin\\Bootstrap.DataAccess\\Bootstrap.DataAccess.csproj",
|
||||
"test\\UnitTest\\UnitTest.csproj"
|
||||
]
|
||||
}
|
||||
}
|
||||
124
LICENSE
124
LICENSE
|
|
@ -1,124 +0,0 @@
|
|||
木兰宽松许可证, 第2版
|
||||
|
||||
2020年1月 http://license.coscl.org.cn/MulanPSL2
|
||||
|
||||
您对“软件”的复制、使用、修改及分发受木兰宽松许可证,第2版(“本许可证”)的如下条款的约束:
|
||||
|
||||
0. 定义
|
||||
|
||||
“软件” 是指由“贡献”构成的许可在“本许可证”下的程序和相关文档的集合。
|
||||
|
||||
“贡献” 是指由任一“贡献者”许可在“本许可证”下的受版权法保护的作品。
|
||||
|
||||
“贡献者” 是指将受版权法保护的作品许可在“本许可证”下的自然人或“法人实体”。
|
||||
|
||||
“法人实体” 是指提交贡献的机构及其“关联实体”。
|
||||
|
||||
“关联实体” 是指,对“本许可证”下的行为方而言,控制、受控制或与其共同受控制的机构,此处的控制是指有受控方或共同受控方至少50%直接或间接的投票权、资金或其他有价证券。
|
||||
|
||||
1. 授予版权许可
|
||||
|
||||
每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的版权许可,您可以复制、使用、修改、分发其“贡献”,不论修改与否。
|
||||
|
||||
2. 授予专利许可
|
||||
|
||||
每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的(根据本条规定撤销除外)专利许可,供您制造、委托制造、使用、许诺销售、销售、进口其“贡献”或以其他方式转移其“贡献”。前述专利许可仅限于“贡献者”现在或将来拥有或控制的其“贡献”本身或其“贡献”与许可“贡献”时的“软件”结合而将必然会侵犯的专利权利要求,不包括对“贡献”的修改或包含“贡献”的其他结合。如果您或您的“关联实体”直接或间接地,就“软件”或其中的“贡献”对任何人发起专利侵权诉讼(包括反诉或交叉诉讼)或其他专利维权行动,指控其侵犯专利权,则“本许可证”授予您对“软件”的专利许可自您提起诉讼或发起维权行动之日终止。
|
||||
|
||||
3. 无商标许可
|
||||
|
||||
“本许可证”不提供对“贡献者”的商品名称、商标、服务标志或产品名称的商标许可,但您为满足第4条规定的声明义务而必须使用除外。
|
||||
|
||||
4. 分发限制
|
||||
|
||||
您可以在任何媒介中将“软件”以源程序形式或可执行形式重新分发,不论修改与否,但您必须向接收者提供“本许可证”的副本,并保留“软件”中的版权、商标、专利及免责声明。
|
||||
|
||||
5. 免责声明与责任限制
|
||||
|
||||
“软件”及其中的“贡献”在提供时不带任何明示或默示的担保。在任何情况下,“贡献者”或版权所有者不对任何人因使用“软件”或其中的“贡献”而引发的任何直接或间接损失承担责任,不论因何种原因导致或者基于何种法律理论,即使其曾被建议有此种损失的可能性。
|
||||
|
||||
6. 语言
|
||||
|
||||
“本许可证”以中英文双语表述,中英文版本具有同等法律效力。如果中英文版本存在任何冲突不一致,以中文版为准。
|
||||
|
||||
条款结束
|
||||
|
||||
如何将木兰宽松许可证,第2版,应用到您的软件
|
||||
|
||||
如果您希望将木兰宽松许可证,第2版,应用到您的新软件,为了方便接收者查阅,建议您完成如下三步:
|
||||
|
||||
1, 请您补充如下声明中的空白,包括软件名、软件的首次发表年份以及您作为版权人的名字;
|
||||
|
||||
2, 请您在软件包的一级目录下创建以“LICENSE”为名的文件,将整个许可证文本放入该文件中;
|
||||
|
||||
3, 请将如下声明文本放入每个源文件的头部注释中。
|
||||
|
||||
Copyright (c) [Year] [name of copyright holder]
|
||||
[Software Name] is licensed under Mulan PSL v2.
|
||||
You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||
You may obtain a copy of Mulan PSL v2 at:
|
||||
http://license.coscl.org.cn/MulanPSL2
|
||||
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||
See the Mulan PSL v2 for more details.
|
||||
Mulan Permissive Software License,Version 2
|
||||
Mulan Permissive Software License,Version 2 (Mulan PSL v2)
|
||||
|
||||
January 2020 http://license.coscl.org.cn/MulanPSL2
|
||||
|
||||
Your reproduction, use, modification and distribution of the Software shall be subject to Mulan PSL v2 (this License) with the following terms and conditions:
|
||||
|
||||
0. Definition
|
||||
|
||||
Software means the program and related documents which are licensed under this License and comprise all Contribution(s).
|
||||
|
||||
Contribution means the copyrightable work licensed by a particular Contributor under this License.
|
||||
|
||||
Contributor means the Individual or Legal Entity who licenses its copyrightable work under this License.
|
||||
|
||||
Legal Entity means the entity making a Contribution and all its Affiliates.
|
||||
|
||||
Affiliates means entities that control, are controlled by, or are under common control with the acting entity under this License, ‘control’ means direct or indirect ownership of at least fifty percent (50%) of the voting power, capital or other securities of controlled or commonly controlled entity.
|
||||
|
||||
1. Grant of Copyright License
|
||||
|
||||
Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable copyright license to reproduce, use, modify, or distribute its Contribution, with modification or not.
|
||||
|
||||
2. Grant of Patent License
|
||||
|
||||
Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable (except for revocation under this Section) patent license to make, have made, use, offer for sale, sell, import or otherwise transfer its Contribution, where such patent license is only limited to the patent claims owned or controlled by such Contributor now or in future which will be necessarily infringed by its Contribution alone, or by combination of the Contribution with the Software to which the Contribution was contributed. The patent license shall not apply to any modification of the Contribution, and any other combination which includes the Contribution. If you or your Affiliates directly or indirectly institute patent litigation (including a cross claim or counterclaim in a litigation) or other patent enforcement activities against any individual or entity by alleging that the Software or any Contribution in it infringes patents, then any patent license granted to you under this License for the Software shall terminate as of the date such litigation or activity is filed or taken.
|
||||
|
||||
3. No Trademark License
|
||||
|
||||
No trademark license is granted to use the trade names, trademarks, service marks, or product names of Contributor, except as required to fulfill notice requirements in section 4.
|
||||
|
||||
4. Distribution Restriction
|
||||
|
||||
You may distribute the Software in any medium with or without modification, whether in source or executable forms, provided that you provide recipients with a copy of this License and retain copyright, patent, trademark and disclaimer statements in the Software.
|
||||
|
||||
5. Disclaimer of Warranty and Limitation of Liability
|
||||
|
||||
THE SOFTWARE AND CONTRIBUTION IN IT ARE PROVIDED WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL ANY CONTRIBUTOR OR COPYRIGHT HOLDER BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO ANY DIRECT, OR INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING FROM YOUR USE OR INABILITY TO USE THE SOFTWARE OR THE CONTRIBUTION IN IT, NO MATTER HOW IT’S CAUSED OR BASED ON WHICH LEGAL THEORY, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
6. Language
|
||||
|
||||
THIS LICENSE IS WRITTEN IN BOTH CHINESE AND ENGLISH, AND THE CHINESE VERSION AND ENGLISH VERSION SHALL HAVE THE SAME LEGAL EFFECT. IN THE CASE OF DIVERGENCE BETWEEN THE CHINESE AND ENGLISH VERSIONS, THE CHINESE VERSION SHALL PREVAIL.
|
||||
|
||||
END OF THE TERMS AND CONDITIONS
|
||||
|
||||
How to Apply the Mulan Permissive Software License,Version 2 (Mulan PSL v2) to Your Software
|
||||
|
||||
To apply the Mulan PSL v2 to your work, for easy identification by recipients, you are suggested to complete following three steps:
|
||||
|
||||
Fill in the blanks in following statement, including insert your software name, the year of the first publication of your software, and your name identified as the copyright owner;
|
||||
Create a file named "LICENSE" which contains the whole context of this License in the first directory of your software package;
|
||||
Attach the statement to the appropriate annotated syntax at the beginning of each source file.
|
||||
Copyright (c) [Year] [name of copyright holder]
|
||||
[Software Name] is licensed under Mulan PSL v2.
|
||||
You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||
You may obtain a copy of Mulan PSL v2 at:
|
||||
http://license.coscl.org.cn/MulanPSL2
|
||||
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||
See the Mulan PSL v2 for more details.
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
# 英文readme
|
||||
# 建议
|
||||
<div align="center"">
|
||||
<a href="https://github.com/xuri/excelize/actions/workflows/go.yml"><img src="https://github.com/xuri/excelize/actions/workflows/go.yml/badge.svg" alt="Build Status"></a>
|
||||
<a href="https://codecov.io/gh/qax-os/excelize"><img src="https://codecov.io/gh/qax-os/excelize/branch/master/graph/badge.svg" alt="Code Coverage"></a>
|
||||
<a href="https://goreportcard.com/report/github.com/xuri/excelize/v2"><img src="https://goreportcard.com/badge/github.com/xuri/excelize/v2" alt="Go Report Card"></a>
|
||||
<a href="https://pkg.go.dev/github.com/xuri/excelize/v2"><img src="https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white" alt="go.dev"></a>
|
||||
<a href="https://opensource.org/licenses/BSD-3-Clause"><img src="https://img.shields.io/badge/license-bsd-orange.svg" alt="Licenses"></a>
|
||||
<a href="https://www.paypal.com/paypalme/xuri"><img src="https://img.shields.io/badge/Donate-PayPal-green.svg" alt="Donate"></a>
|
||||
</div>
|
||||
|
||||
# 用户反馈
|
||||
<p>
|
||||
<a href="https://github.com/xuri/excelize/actions/workflows/go.yml"><img src="https://github.com/xuri/excelize/actions/workflows/go.yml/badge.svg" alt="Build Status"></a>
|
||||
<a href="https://codecov.io/gh/qax-os/excelize"><img src="https://codecov.io/gh/qax-os/excelize/branch/master/graph/badge.svg" alt="Code Coverage"></a>
|
||||
<a href="https://goreportcard.com/report/github.com/xuri/excelize/v2"><img src="https://goreportcard.com/badge/github.com/xuri/excelize/v2" alt="Go Report Card"></a>
|
||||
<a href="https://pkg.go.dev/github.com/xuri/excelize/v2"><img src="https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white" alt="go.dev"></a>
|
||||
<a href="https://opensource.org/licenses/BSD-3-Clause"><img src="https://img.shields.io/badge/license-bsd-orange.svg" alt="Licenses"></a>
|
||||
<a href="https://www.paypal.com/paypalme/xuri"><img src="https://img.shields.io/badge/Donate-PayPal-green.svg" alt="Donate"></a>
|
||||
</p>
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
# 中文readme
|
||||
# 建议
|
||||
<div align="center"">
|
||||
<a href="https://github.com/xuri/excelize/actions/workflows/go.yml"><img src="https://github.com/xuri/excelize/actions/workflows/go.yml/badge.svg" alt="Build Status"></a>
|
||||
<a href="https://codecov.io/gh/qax-os/excelize"><img src="https://codecov.io/gh/qax-os/excelize/branch/master/graph/badge.svg" alt="Code Coverage"></a>
|
||||
<a href="https://goreportcard.com/report/github.com/xuri/excelize/v2"><img src="https://goreportcard.com/badge/github.com/xuri/excelize/v2" alt="Go Report Card"></a>
|
||||
<a href="https://pkg.go.dev/github.com/xuri/excelize/v2"><img src="https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white" alt="go.dev"></a>
|
||||
<a href="https://opensource.org/licenses/BSD-3-Clause"><img src="https://img.shields.io/badge/license-bsd-orange.svg" alt="Licenses"></a>
|
||||
<a href="https://www.paypal.com/paypalme/xuri"><img src="https://img.shields.io/badge/Donate-PayPal-green.svg" alt="Donate"></a>
|
||||
</div>
|
||||
|
||||
# 用户反馈
|
||||
<p>
|
||||
<a href="https://github.com/xuri/excelize/actions/workflows/go.yml"><img src="https://github.com/xuri/excelize/actions/workflows/go.yml/badge.svg" alt="Build Status"></a>
|
||||
<a href="https://codecov.io/gh/qax-os/excelize"><img src="https://codecov.io/gh/qax-os/excelize/branch/master/graph/badge.svg" alt="Code Coverage"></a>
|
||||
<a href="https://goreportcard.com/report/github.com/xuri/excelize/v2"><img src="https://goreportcard.com/badge/github.com/xuri/excelize/v2" alt="Go Report Card"></a>
|
||||
<a href="https://pkg.go.dev/github.com/xuri/excelize/v2"><img src="https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white" alt="go.dev"></a>
|
||||
<a href="https://opensource.org/licenses/BSD-3-Clause"><img src="https://img.shields.io/badge/license-bsd-orange.svg" alt="Licenses"></a>
|
||||
<a href="https://www.paypal.com/paypalme/xuri"><img src="https://img.shields.io/badge/Donate-PayPal-green.svg" alt="Donate"></a>
|
||||
</p>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
ersonal access tokens
|
||||
|
||||
Tokens you have generated that can be used to access the GitHub API.
|
||||
|
||||
Make sure to copy your personal access token now. You won’t be able to see it again!
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
Personal access tokens
|
||||
|
||||
Tokens you have generated that can be used to access the GitHub API.
|
||||
|
||||
Make sure to copy your personal access token now. You won’t be able to see it again!
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
class BiddingUsersController < ApplicationController
|
||||
before_action :require_login, :check_auth
|
||||
|
||||
def create
|
||||
ProjectPackages::BiddingService.call(current_package, current_user)
|
||||
render_ok
|
||||
rescue ProjectPackages::BiddingService::Error => ex
|
||||
render_error(ex.message)
|
||||
end
|
||||
|
||||
def win
|
||||
ProjectPackages::WinBiddingService.call(current_package, current_user, params)
|
||||
render_ok
|
||||
rescue ProjectPackages::WinBiddingService::Error => ex
|
||||
render_error(ex.message)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def current_package
|
||||
@_current_package ||= ProjectPackage.find(params[:project_package_id])
|
||||
end
|
||||
end
|
||||
Binary file not shown.
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"module": "esnext",
|
||||
"baseUrl": "./",
|
||||
"moduleResolution": "node",
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"src/*"
|
||||
]
|
||||
},
|
||||
"lib": [
|
||||
"esnext",
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"scripthost"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
module.exports = {
|
||||
presets: [
|
||||
'@vue/cli-plugin-babel/preset'
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# @Time : 2021/8/14 23:46
|
||||
# @Author : Flora.Chen
|
||||
# @File : test_login_ui.py
|
||||
# @Software: PyCharm
|
||||
# @Desc:
|
||||
|
||||
from test_api import os, API_DATA, BaseApi, json, pytest, operate_deepdiff, logger, EnvData, extras
|
||||
from utils.otherUtils.handle_eval_data import eval_data_process
|
||||
|
||||
|
||||
def check_case_data():
|
||||
data = EnvData.check_data(os.path.join(API_DATA, "login_data.yaml"))
|
||||
return data
|
||||
|
||||
|
||||
@pytest.mark.api
|
||||
@pytest.mark.loginapi
|
||||
class TestLoginApi:
|
||||
"""
|
||||
登录的API测试用例
|
||||
"""
|
||||
|
||||
cases = check_case_data()
|
||||
logger.debug("测试一下这部分代码是否运行")
|
||||
|
||||
@pytest.mark.parametrize("case", cases, ids=["{}".format(case["title"]) for case in cases])
|
||||
def test_login_api(self, case, env_users, extra):
|
||||
"""
|
||||
测试登录接口的测试用例
|
||||
"""
|
||||
|
||||
if case["is_run"] is False:
|
||||
reason = f"该用例:[{case['title']}], 用例文件设置了暂时跳过, is_run=false"
|
||||
logger.info(reason)
|
||||
pytest.skip(reason)
|
||||
|
||||
logger.info("--------------开始执行用例--------------")
|
||||
logger.info(f"用例标题:{case['title']}")
|
||||
logger.info(f"初始用例数据:{case}")
|
||||
host, users = env_users
|
||||
|
||||
# 给测试数据类设置类属性,方便后面用例数据的替换
|
||||
setattr(EnvData, "login", users["reporter"]["user"])
|
||||
setattr(EnvData, "password", users["reporter"]["pwd"])
|
||||
setattr(EnvData, "username", users["reporter"]["nickname"])
|
||||
setattr(EnvData, "user_id", users["reporter"]["id"])
|
||||
|
||||
# 替换用例数据
|
||||
case = EnvData.replace_data(json.dumps(case, ensure_ascii=False))
|
||||
case = json.loads(case)
|
||||
case["url"] = host + case["url"]
|
||||
logger.info(f"替换后的用例数据:{case}")
|
||||
extra.append(extras.text(str(case), name="替换后的用例数据"))
|
||||
|
||||
# 断言
|
||||
try:
|
||||
response = BaseApi().send_request(**case)
|
||||
actual = response.json()
|
||||
expected = eval_data_process(case['assert']['expected_response'])
|
||||
logger.info(f"预期结果:{expected}\n实际结果:{actual}")
|
||||
extra.append(extras.text(f"预期结果:{expected}\n实际结果:{actual}", name="测试结果"))
|
||||
if case["assert"].get("expected_response_code"):
|
||||
assert response.status_code == case["assert"]["expected_response_code"]
|
||||
|
||||
if case["assert"].get("expected_response"):
|
||||
operate_deepdiff(case["assert"]["expected_response"], actual,
|
||||
{"exclude_paths": {"root['image_url']", "root['is_watch']", "root['admin']",
|
||||
"root['user_identity']"}})
|
||||
except AttributeError as e:
|
||||
logger.error(f"断言时遇到了异常:{e},当前用例:【{case['title']}】测试失败")
|
||||
raise e
|
||||
else:
|
||||
logger.info(f"当前用例:【{case['title']}】测试通过")
|
||||
finally:
|
||||
logger.info("--------------当前用例执行完毕--------------")
|
||||
|
|
@ -0,0 +1,186 @@
|
|||
/**
|
||||
* @filedescription Merge Strategy Tests
|
||||
*/
|
||||
/* global it, describe, beforeEach */
|
||||
|
||||
"use strict";
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Requirements
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
const assert = require("chai").assert;
|
||||
const { ValidationStrategy } = require("../src/");
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Class
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
describe("ValidationStrategy", () => {
|
||||
|
||||
describe("boolean", () => {
|
||||
it("should not throw an error when the value is a boolean", () => {
|
||||
ValidationStrategy.boolean(true);
|
||||
});
|
||||
|
||||
it("should throw an error when the value is null", () => {
|
||||
assert.throws(() => {
|
||||
ValidationStrategy.boolean(null);
|
||||
}, /Expected a Boolean/);
|
||||
});
|
||||
|
||||
it("should throw an error when the value is a string", () => {
|
||||
assert.throws(() => {
|
||||
ValidationStrategy.boolean("foo");
|
||||
}, /Expected a Boolean/);
|
||||
});
|
||||
|
||||
it("should throw an error when the value is a number", () => {
|
||||
assert.throws(() => {
|
||||
ValidationStrategy.boolean(123);
|
||||
}, /Expected a Boolean/);
|
||||
});
|
||||
|
||||
it("should throw an error when the value is an object", () => {
|
||||
assert.throws(() => {
|
||||
ValidationStrategy.boolean({});
|
||||
}, /Expected a Boolean/);
|
||||
});
|
||||
});
|
||||
|
||||
describe("number", () => {
|
||||
it("should not throw an error when the value is a number", () => {
|
||||
ValidationStrategy.number(25);
|
||||
});
|
||||
|
||||
it("should throw an error when the value is null", () => {
|
||||
assert.throws(() => {
|
||||
ValidationStrategy.number(null);
|
||||
}, /Expected a number/);
|
||||
});
|
||||
|
||||
it("should throw an error when the value is a string", () => {
|
||||
assert.throws(() => {
|
||||
ValidationStrategy.number("foo");
|
||||
}, /Expected a number/);
|
||||
});
|
||||
|
||||
it("should throw an error when the value is a boolean", () => {
|
||||
assert.throws(() => {
|
||||
ValidationStrategy.number(true);
|
||||
}, /Expected a number/);
|
||||
});
|
||||
|
||||
it("should throw an error when the value is an object", () => {
|
||||
assert.throws(() => {
|
||||
ValidationStrategy.number({});
|
||||
}, /Expected a number/);
|
||||
});
|
||||
});
|
||||
|
||||
describe("object", () => {
|
||||
it("should not throw an error when the value is an object", () => {
|
||||
ValidationStrategy.object({});
|
||||
});
|
||||
|
||||
it("should throw an error when the value is null", () => {
|
||||
assert.throws(() => {
|
||||
ValidationStrategy.object(null);
|
||||
}, /Expected an object/);
|
||||
});
|
||||
|
||||
it("should throw an error when the value is a string", () => {
|
||||
assert.throws(() => {
|
||||
ValidationStrategy.object("");
|
||||
}, /Expected an object/);
|
||||
});
|
||||
});
|
||||
|
||||
describe("array", () => {
|
||||
it("should not throw an error when the value is an array", () => {
|
||||
ValidationStrategy.array([]);
|
||||
});
|
||||
|
||||
it("should throw an error when the value is null", () => {
|
||||
assert.throws(() => {
|
||||
ValidationStrategy.array(null);
|
||||
}, /Expected an array/);
|
||||
});
|
||||
|
||||
it("should throw an error when the value is a string", () => {
|
||||
assert.throws(() => {
|
||||
ValidationStrategy.array("");
|
||||
}, /Expected an array/);
|
||||
});
|
||||
|
||||
it("should throw an error when the value is an object", () => {
|
||||
assert.throws(() => {
|
||||
ValidationStrategy.array({});
|
||||
}, /Expected an array/);
|
||||
});
|
||||
});
|
||||
|
||||
describe("object?", () => {
|
||||
it("should not throw an error when the value is an object", () => {
|
||||
ValidationStrategy["object?"]({});
|
||||
});
|
||||
|
||||
it("should not throw an error when the value is null", () => {
|
||||
ValidationStrategy["object?"](null);
|
||||
});
|
||||
|
||||
it("should throw an error when the value is a string", () => {
|
||||
assert.throws(() => {
|
||||
ValidationStrategy["object?"]("");
|
||||
}, /Expected an object/);
|
||||
});
|
||||
});
|
||||
|
||||
describe("string", () => {
|
||||
it("should not throw an error when the value is a string", () => {
|
||||
ValidationStrategy.string("foo");
|
||||
});
|
||||
|
||||
it("should not throw an error when the value is an empty string", () => {
|
||||
ValidationStrategy.string("");
|
||||
});
|
||||
|
||||
it("should throw an error when the value is null", () => {
|
||||
assert.throws(() => {
|
||||
ValidationStrategy.string(null);
|
||||
}, /Expected a string/);
|
||||
});
|
||||
|
||||
it("should throw an error when the value is an object", () => {
|
||||
assert.throws(() => {
|
||||
ValidationStrategy.string({});
|
||||
}, /Expected a string/);
|
||||
});
|
||||
});
|
||||
|
||||
describe("string!", () => {
|
||||
it("should not throw an error when the value is an string", () => {
|
||||
ValidationStrategy["string!"]("foo");
|
||||
});
|
||||
|
||||
it("should throw an error when the value is an empty string", () => {
|
||||
assert.throws(() => {
|
||||
ValidationStrategy["string!"]("");
|
||||
}, /Expected a non-empty string/);
|
||||
});
|
||||
|
||||
it("should throw an error when the value is null", () => {
|
||||
assert.throws(() => {
|
||||
ValidationStrategy["string!"](null);
|
||||
}, /Expected a non-empty string/);
|
||||
});
|
||||
|
||||
it("should throw an error when the value is an object", () => {
|
||||
assert.throws(() => {
|
||||
ValidationStrategy["string!"]({});
|
||||
}, /Expected a non-empty string/);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
BIN
蒙版组 803 (2).png
BIN
蒙版组 803 (2).png
Binary file not shown.
|
Before Width: | Height: | Size: 639 KiB |
Loading…
Reference in New Issue