添加测试代码
This commit is contained in:
parent
c098f51152
commit
8936b9ff9c
|
|
@ -5,10 +5,13 @@ using Microsoft.AspNetCore.Mvc;
|
|||
|
||||
namespace CodeRelease.Controllers
|
||||
{
|
||||
|
||||
[Route("api/[controller]/[Action]")]
|
||||
[ApiController]
|
||||
public class PublishController : ControllerBase
|
||||
{
|
||||
[HttpGet]
|
||||
[HttpPost]
|
||||
/// <summary>
|
||||
/// 测试
|
||||
/// </summary>
|
||||
|
|
@ -16,7 +19,7 @@ namespace CodeRelease.Controllers
|
|||
public async Task<object> Test()
|
||||
{
|
||||
LinuxExecuteCommand linuxExecuteCommand = new LinuxExecuteCommand();
|
||||
var obj = await linuxExecuteCommand.ExecuteCommand("");
|
||||
var obj = await linuxExecuteCommand.ExecuteCommand("make test -f /disk/CodeRelease/test/makefile");
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,5 +5,14 @@
|
|||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*"
|
||||
"AllowedHosts": "*",
|
||||
"Kestrel": {
|
||||
"Endpoints": {
|
||||
"Http": {
|
||||
"Url": "http://*:5240"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
6
test/makefile
Normal file
6
test/makefile
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
SHELL=/usr/bin/env bash
|
||||
date_dir_name = $(shell date +"%Y%m%d-%H%M%S")
|
||||
test:
|
||||
@echo $(date_dir_name)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user