Using: https://github.com/GoogleContainerTools/container-structure-test
Install:
$ brew install container-structure-testRun it with the nonroot.yaml config file provided in the gist:
| local M = {} | |
| local function parse_request_line(line) | |
| local method, url, version = line:match("^(%S+)%s+(%S+)%s*(.*)") | |
| if not method or not url then | |
| return nil, "Invalid HTTP request line format" | |
| end | |
| if method:upper() ~= "GET" and method:upper() ~= "POST" and method:upper() ~= "PUT" and method:upper() ~= "DELETE" and method:upper() ~= "PATCH" then | |
| return nil, "Unsupported HTTP method: " .. method |
| ---@diagnostic disable: undefined-global | |
| if vim.g.vscode then | |
| return | |
| end | |
| -- encoding | |
| vim.o.encoding = "utf-8" | |
| vim.o.fileencoding = "utf-8" |
| const ( | |
| streamName = "my-stream" | |
| consumerName = "my-consumer" | |
| ) | |
| var subjects = []string{ | |
| "subject.foo", | |
| "subject.bar", | |
| } |
| #!/usr/bin/python3 | |
| import base64 | |
| import requests | |
| # OpenAI API Key | |
| api_key = "<INSERT KEY HERE>" | |
| # Function to encode the image | |
| def encode_image(image_path): |
| package main | |
| import ( | |
| "context" | |
| "log" | |
| "strings" | |
| "github.com/aws/aws-sdk-go-v2/aws" | |
| "github.com/aws/aws-sdk-go-v2/config" | |
| "github.com/aws/aws-sdk-go-v2/service/secretsmanager" |
Using: https://github.com/GoogleContainerTools/container-structure-test
Install:
$ brew install container-structure-testRun it with the nonroot.yaml config file provided in the gist:
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "net/http" | |
| "github.com/go-chi/chi/v5" | |
| "github.com/go-chi/chi/v5/middleware" | |
| ) |
| package gingko_subtests_test | |
| import ( | |
| "testing" | |
| "github.com/stretchr/testify/assert" | |
| ) | |
| func TestCheckingBooksOutOfLibrary(t *testing.T) { | |
| t.Run("when the library has the book in question", func(t *t.Testing) { | |
| t.Run("if the book is available, it lends it to the reader", func(t *t.Testing) { |
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "sync" | |
| ) | |
| type Input struct { | |
| Id string |
| package main | |
| import ( | |
| "context" | |
| "fmt" | |
| "sync" | |
| "time" | |
| ) | |
| // simply runs a program to showcase how to properly leverage |