Skip to content

Instantly share code, notes, and snippets.

View djberg96's full-sized avatar

Daniel Berger djberg96

View GitHub Profile
// Current error: cannot use services (type []openapi.Service) as type []openapi.ObjectReference in field value
func TestPeerDependencyPostWithValidServiceIds(t *testing.T){
h, client := test.RegisterIntegration(t)
account := h.NewRandAccount()
ctx := h.NewAuthenticatedContext(account)
service_uuid1 := h.NewUUID()
service_uuid2 := h.NewUUID()
service1 := h.NewService(service_uuid1, h.NewApplication(h.NewUUID(), h.NewApplicationGroup(h.NewUUID())))
require 'awesome_print'
require 'json'
require 'excon'
require 'securerandom'
url = "http://localhost:8000/api/status-board/v1/peer_dependencies"
service_id1 = SecureRandom.uuid
service_id2 = SecureRandom.uuid
require 'awesome_print'
require 'json'
require 'excon'
url = "http://localhost:8000/api/status-board/v1/peer_dependencies"
# Update as needed
service_id1 = "b81c87a8-4528-4560-8647-c75566099b1a"
service_id2 = "9f148ae6-056d-4322-b8d4-9e885a3b35c6"
package main
import(
"fmt"
"os"
"os/signal"
"syscall"
"time"
)
// Run "createdb pgstuff" first
package main
import(
"fmt"
"gorm.io/driver/postgres"
"gorm.io/gorm"
"time"
)
>make test
go test ./...
? gitlab.cee.redhat.com/service/status-board/cmd/status-board [no test files]
? gitlab.cee.redhat.com/service/status-board/cmd/status-board/environments [no test files]
? gitlab.cee.redhat.com/service/status-board/cmd/status-board/generate [no test files]
? gitlab.cee.redhat.com/service/status-board/cmd/status-board/migrate [no test files]
? gitlab.cee.redhat.com/service/status-board/cmd/status-board/servecmd [no test files]
? gitlab.cee.redhat.com/service/status-board/data/generated/openapi [no test files]
? gitlab.cee.redhat.com/service/status-board/pkg/api [no test files]
? gitlab.cee.redhat.com/service/status-board/pkg/api/openapi [no test files]
rm -f pkg/api/openapi/go.mod pkg/api/openapi/go.sum
gofmt -w pkg/api/openapi
for file in pkg/api/openapi/model_*.go; do \
perl -0777 -i -pe 's/\nimport \(\)\n//igs' $file; \
done
go generate ./cmd/status-board
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'yaml'
cmd/status-board/main.go:4: running "sh": exit status 1
module Sys::Info
VERSION = "0.1.0"
lib LibC
struct Uname
sysname : ::LibC::Char[256]
nodename : ::LibC::Char[256]
release : ::LibC::Char[256]
version : ::LibC::Char[256]
machine : ::LibC::Char[256]
module Sys::Info
VERSION = "0.1.0"
lib C
struct Uname
sysname : StaticArray(UInt8, 256)
nodename : StaticArray(UInt8, 256)
release : StaticArray(UInt8, 256)
version : StaticArray(UInt8, 256)
machine : StaticArray(UInt8, 256)
@djberg96
djberg96 / uname.cr
Last active February 5, 2021 22:47
module Sys::Uname
VERSION = "0.1.0"
lib C
struct Uname
sysname : StaticArray(UInt8, 256)
nodename : StaticArray(UInt8, 256)
release : StaticArray(UInt8, 256)
version : StaticArray(UInt8, 256)
machine : StaticArray(UInt8, 256)