api7 / api7/api7-ingress-controller

test: replace unnecessary `CreateResourceFromStringWithNamespace` with `CreateResourceFromString`

Open
#246 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
5
Forks
5
Avg merge
2d 7h
Merged PRs (30d)
10

Description

Some code uses CreateResourceFromStringWithNamespace, but it is unnecessary, and it can be considered to be replaced with CreateResourceFromString.

gatewayProxyName := s.Namespace()
err = s.CreateResourceFromStringWithNamespace(fmt.Sprintf(defaultGatewayProxy, gatewayProxyName, s.Deployer.GetAdminEndpoint(), s.AdminKey()), s.Namespace())

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Search the repository for uses of CreateResourceFromStringWithNamespace, starting with the shown gatewayProxyName example and its CreateResourceFromString call. Replace only the unnecessary namespace-specific uses, then run the relevant Go tests to confirm the changes preserve behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
testing-qa
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.