Skip to main content
Filter by
Sorted by
Tagged with
1 vote
0 answers
24 views

When writing Ginkgo unit tests, I ran into an issue asserting data received from a channel that contains a struct with an interface{} field. Here's my models.go type WsBaseMsg struct { Type ...
CyberCr0w's user avatar
0 votes
1 answer
236 views

I am running tests using ginkgo, and I am trying to skip two of my tests that are not applicable to my environment. ./_output/bin/e2e.test --ginkgo.focus="sig-network.*[Conformance]" --...
Senthil Kumaran's user avatar
1 vote
1 answer
162 views

I have some tests written in Ginkgo that check the return-code, a 502 code should be returned at a specific moment in time, it returns 502 (as you can see on the logs) but the w.Code is still 200. [...
LombardiD's user avatar
  • 340
0 votes
0 answers
219 views

Trying to write a REGEX for the ginkgo --skip flag, that would skip tests that do NOT contain a string ("test1"). AFAIK golang doesn't support '!' (this post) I know I can use --focus, but ...
Anton Asserzon's user avatar
1 vote
0 answers
173 views

Say I am runing a test suites, is there a way to get the information of the current test that's running, for example, its labels or its text? my use case is as follows: I have a test suite which ...
5h3re3n's user avatar
  • 147
0 votes
1 answer
163 views

I am trying to execute acceptance testing (AATs), But when eveni try to use ginkgo command or make aat, it fails with below go error : lisha@admin-bld-box:$ ginkgo Failed to compile topology-...
lisha midha's user avatar
3 votes
1 answer
1k views

I have a Ginkgo test suite that has many test files. I can run all tests under the test suite with the following command, where ./controller is the package that has all tests. go test ./controllers/......
Mike's user avatar
  • 1,897
1 vote
1 answer
2k views

I am currently working on getting familiar with Ginkgo testing framework to write unit tests for api calls and just plain functions. Having trouble wrapping my head around mocking things. Right now I ...
Tom's user avatar
  • 21
2 votes
3 answers
2k views

Example error print of a unit test: Expected <string>: "...up - Finish..." to equal | <string>: "...up - Vault .....
rufreakde's user avatar
  • 652
1 vote
0 answers
239 views

I am working with /onsi/ginkgo/v2 v2.1.4 and /golang/mock v1.6.0 in Golang v1.19.2 And I want to retrieve the argument that was sent to the mock's InsertOneProspecto function. ctrl = gomock....
Kaltresian's user avatar
  • 1,001
2 votes
1 answer
1k views

I'm using go with multiple version as stated in this doc https://go.dev/doc/manage-install go install golang.org/dl/go1.10.7@latest go1.10.7 download And I'm also using ginkgo, which I installed like ...
Eric's user avatar
  • 6,146
3 votes
1 answer
444 views

For instance: If I have a wrapper for https://pkg.go.dev/sync#Map.Load: with the same method signature: func Load(key string) (value interface{}, ok bool) in Can Gomega's Equal() handle multiple ...
user892960's user avatar
1 vote
0 answers
119 views

I have installed ginkgo, but I cannot locate it inside the /Users/user-name/gowork/src/github.com/onsi folder. If I delete the gowork folder, I can see the ginkgo folders within it, in Trash. ginkgo ...
fa-tester's user avatar
0 votes
1 answer
653 views

I was writing tests using ginkgo framework, and wanted to reduce duplication within my tests. Suppose I have two tests, which have a exactly common middle section, but different start and end sections....
Tarun Gupta's user avatar
2 votes
0 answers
483 views

I'm integrating mock server to out tests. As part of it I need to clear all the request that was caught by mock server. Due to restrictions of the service we use, I can do it only once for all the ...
ogbofjnr's user avatar
  • 2,046
4 votes
1 answer
3k views

I'm writing a test to assert that a function panics on invalid input, but Ginkgo records the panic as a failure instead of a passing result as expected. func ParseUnixTimeString(unixTimeString string) ...
frederix's user avatar
  • 1,872
1 vote
1 answer
4k views

I have the following file structure: ❯ tree . ├── go.mod ├── go.sum ├── Makefile ├── p1 │ └── p1.go └── tests └── integration └── integration_suite_test.go 3 directories, 5 files Where,...
Sankar's user avatar
  • 6,591
2 votes
2 answers
5k views

Please note that struct S implements the interface I. I'm trying to test MethodA by mocking the response from MethodB. sample.go: package service // This is implemented by S type I interface { ...
Skn's user avatar
  • 170
8 votes
1 answer
8k views

When I run this command ginkgo bootstrap I am getting this error zsh: command not found: ginkgo I have already installed ginkgo using the following command go get -u github.com/onsi/ginkgo/ginkgo ...
Usman Sajid's user avatar
2 votes
1 answer
1k views

I have a golang function which recursively steps through a json string and replaces custom references with the json document they are referencing. I just noticed that I forgot to handle cyclic ...
DonGiovanni's user avatar
  • 1,515
-1 votes
2 answers
709 views

In my code snippet below or https://play.golang.org/p/tLld-zNF2zp, testValue was declared inside Describe block, changed in BeforeEach block. Then, used in. It Expect The test passes as expected. ...
AlbertLeng's user avatar
0 votes
1 answer
834 views

I'm setting up GitLab CI. We use Ginkgo tests for BDD. Ginkgo creates a report per each folder where tests are located. This create a problem with collecting all reports and publishing it as a single ...
Dmitry Dyachkov's user avatar
2 votes
1 answer
2k views

Is it possible to have a variable number of test cases. Let's say I have a BeforeSuite function which calculates the values in the array. Then based on the length of the array, I want to run one test ...
nishantkj911's user avatar
9 votes
1 answer
12k views

./I have a test suite that has 4 specs, like this: var _ = Describe("Start a Cycle", func() { It("test 1", func() {...}) It("test 2", func() {...}) It("test 3&...
jliao's user avatar
  • 251
1 vote
1 answer
130 views

I am trying to run e2e tests on Kubernetes cluster but while running Pods are pulled from docker and the docker is using default username present in the git-hub and the limit is exceeding. I need to ...
karthik B.N's user avatar
0 votes
1 answer
420 views

I am trying to do some testing with ginkgo and gomega, I get down to the assertion error Expected <[]map[string]interface {} | len:1, cap:1>: [] To equal <[]map[string]...
benwasin97's user avatar
-2 votes
1 answer
1k views

During testing I get the error message Expected <[]map[string]interface {} | len:0, cap:0>: [] to equal <[]map[string]interface {} | len:0, cap:0>: nil How Do i ...
benwasin97's user avatar
17 votes
2 answers
7k views

I'm evaluating ginkgo at the moment - I very much like the BDD style. However I'm unable at the moment to get the VS Code debugger to work with the framework. The official VS-Code extension provides ...
bighairdave's user avatar
0 votes
1 answer
2k views

I have expanded the following code as per my requirement. https://github.com/radovskyb/watcher/blob/master/example/basics/main.go Purpose of this code is to watch of certain events (CREATE, WRITE) and ...
tgcloud's user avatar
  • 887
4 votes
1 answer
1k views

I am a newbie for operator-sdk. Now I am writing test for operator with envtest framework, so I had a fake control-plane for environments. Inside controller reconcile loop, once I initialize a CR, ...
Joe's user avatar
  • 713
1 vote
1 answer
2k views

I use ginkgo to write some tests, including: books_suite_test.go install_test.go reading_test.go isbn_test.go uninstall_test.go how to run these tests in a specific order as following: install_test....
LEo's user avatar
  • 462
0 votes
1 answer
4k views

Suppose a function Builder that returns a struct like this: type MyStruct struct{ List []OtherStruct } I want to test the Builder function using ginkgo. I created a test suite with the ...
pablochacin's user avatar
  • 1,026
1 vote
0 answers
295 views

I have a problem with a compilation of Android Linux kernel ./include/trace/events/sched.h:269:2: error: #error "Unsupported NR_CPUS for lb tracepoint." 269 | #error "Unsupported ...
Данила Миронов's user avatar
3 votes
3 answers
1k views

I'm rewriting unit test of our k8s controller with ginkgo. As previous TDD, for each test, we will have something like. // Create the Channel object and expect the Reconcile g.Expect(c....
Ian Zhang's user avatar
  • 432
0 votes
1 answer
435 views

I wanna start my app in BeforeSuit and run a GET Request. Is that possible? example_suite_test.go func TestExample(t *testing.T) { RegisterFailHandler(Fail) RunSpecs(t, "Example Suite") } ...
Jen's user avatar
  • 131
0 votes
0 answers
124 views

I stumbled upon something weird as I was writing tests. I have written a lot of table tests and I like the pattern recently I started working on a project that uses Ginkgo, and I wanted to write a ...
Benjamin Hammer Nørgaard's user avatar
1 vote
0 answers
48 views

I have cloned the Stellar Horizon Repo from GitHub written in Go. I thought to run the test cases first.where the test cases have been written by using GINKGO Testing Framework. I have been running ...
sayoojmandodi's user avatar
5 votes
2 answers
1k views

I am using Ginkgo to execute some relatively long-running integration tests. Interspersed with my test output is the occasional warning that my tests are taking too long to execute: • [SLOW TEST:30....
Henrik Aasted Sørensen's user avatar
0 votes
0 answers
190 views

I need to pass user data via console or any file formats to ginkgo test methods. Let me know the ways. I am looking into Table Driven Tests, but I am looking for test data which is located outside of ...
Vasanthi's user avatar
1 vote
0 answers
1k views

I have a test method like below: It("test description", func() { expectcc.ResponseOk(name.Invoke(`issue`, &cpaper.test{ Issuer: IssuerName, PaperNumber: "0001", ...
Vasanthi's user avatar
1 vote
1 answer
1k views

I am writing my test specs in Ginkgo. My tests have the following structure: It("Setup X, Y, Z resources and check conditions" func() { // setup resources. // assert certain conditions ...
SeattleOrBayArea's user avatar
1 vote
1 answer
425 views

While writing tests using Ginkgo framework I noticed, that pressing C-c to terminate a running suite generates false positive. note the green "1 Passed" When you look at the code you will notice ...
karmazyn's user avatar
0 votes
0 answers
889 views

Assume that I have a function called GetQueue with GoLang and depends on the configuration, it would return different types of queue implementations. func GetQueue(config string) *service.Queue { ...
injoy's user avatar
  • 4,423
1 vote
1 answer
1k views

I am using Shippable as my CI and my project is based on Go 1.11. All the unit tests are written in BDD style using Ginkgo and Gomega. In my test pipeline, I have something like: gocov test ./... | ...
Tejashwi Kalp Taru's user avatar
0 votes
1 answer
3k views

I've being using Ginkgo for a while and I have found a behavior I don't really understand. I have a set of specs that I only want to run if and only if a condition is available. If the condition is ...
Juan Manuel Tirado Martin's user avatar
2 votes
2 answers
2k views

I'm implementing test suite for brand new go app and decided to use ginkgo. The app has main function and several packages . |- main.go |- types | |-- user.go | |-- post.go |- server_pkg | |-- ...
Artem's user avatar
  • 384
1 vote
2 answers
712 views

I am trying to install ginkgo and gomega using the gopkg. It is throwing the following error: src/gopkg.in/onsi/ginkgo.v1/ginkgo_dsl.go:24:2: use of internal package not allowed src/gopkg.in/onsi/...
hemanik's user avatar
  • 1,135
2 votes
2 answers
6k views

I am testing a function to send a mock request to a server using gomega and I want to verify that 1. the request has started 2. the request has completed. For this I am returning two booleans. They ...
user2969402's user avatar
  • 1,261
0 votes
1 answer
1k views

How to write test case in multiple test file using ginkgo? a_suite_test.go file: func TestA(t *testing.T) { RegisterFailHandler(Fail) RunSpecs(t, "A Suite") } a_test.go: var _ = Describe("A"...
nameless's user avatar
  • 2,435
2 votes
2 answers
3k views

When I run/debug Ginkgo test from Intellij Idea (with Go plugin installed), it does not shut down gracefully if I press "Stop" button. JustBeforeEach and AfterEach functions do not get executed and ...
Kirill's user avatar
  • 8,388