initial commit

This commit is contained in:
W Anders
2024-05-06 17:37:57 -06:00
commit 12bcac933a
35 changed files with 3027 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch Test",
"type": "go",
"request": "launch",
"mode": "test",
"program": "${workspaceFolder}"
}
]
}
+3
View File
@@ -0,0 +1,3 @@
{
"go.testFlags": ["-v"]
}
+80
View File
@@ -0,0 +1,80 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "[Start] Netbox test instance",
"type": "docker-compose",
"dockerCompose": {
"projectName": "coredns-netbox-plugin-dns",
"up": {
"detached": true,
"build": true,
},
"files": [
"${workspaceFolder}/.testing/docker-compose.yml"
]
}
},
{
"label": "[Stop] Netbox test instance",
"type": "docker-compose",
"dockerCompose": {
"projectName": "coredns-netbox-plugin-dns",
"down": {
"removeVolumes": true
},
"files": [
"${workspaceFolder}/.testing/docker-compose.yml"
]
}
},
{
"label": "Go Coverage",
"type": "shell",
"command": "go",
"args": [
"test",
"-short",
"-coverprofile=${workspaceFolder}/coverage.out",
"./..."
],
"options": {
"env": {
"CGO_ENABLED": "0"
}
},
"problemMatcher": {
"pattern": {
"regexp": ".*"
}
}
},
{
"label": "Go View Coverage",
"type": "shell",
"linux": {
"command": "setsid",
"args": [
"go",
"tool",
"cover",
"-html=${workspaceFolder}/coverage.out"
]
},
"windows": {
"command": "go",
"args": [
"tool",
"cover",
"-html=${workspaceFolder}/coverage.out"
]
},
"dependsOn": "Go Coverage",
"problemMatcher": {
"pattern": {
"regexp": ".*"
}
}
},
]
}