state: not all public methods are tested
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Won't Fix
|
Low
|
Unassigned |
Bug Description
Having found that State.UpdateClo
credentials as advertised (https:/
that that method has no tests.
Concerned by this, I ran the coverage tool on the state package and found the following
additional non-trivial methods and functions that are not tested at all:
Application.
Charm.
ItemChange.String
MacaroonCache.Get
MacaroonCache.Set
Machine.
Machine.
Machine.
Machine.
Machine.
Machine.
Machine.
Machine.
Machine.
Model.ConfigValues
RestoreInfo.
State.FindEntity
State.MongoVersion
State.
State.
StateSettings.
StateSettings.
State.
State.
State.
State.
State.
Unit.Availabil
SetSystemIdentity
ParseBlockType
IsCharmAlready
I also saw the following non-public methods that seem to have substantial
non-trivial untested sections of logic:
State.
openedPortsWat
State.
removeStorageA
machineStorage
I think it's reasonable to expect that every public non-trivial function
and method should have at least one test.
tags: | added: unit-tests |
Changed in juju-core: | |
status: | New → Triaged |
importance: | Undecided → Low |
milestone: | none → 2.0.0 |
affects: | juju-core → juju |
Changed in juju: | |
milestone: | 2.0.0 → none |
milestone: | none → 2.0.0 |
Changed in juju: | |
milestone: | 2.0.0 → 2.0.1 |
Changed in juju: | |
milestone: | 2.0.1 → none |
Changed in juju: | |
status: | Triaged → Won't Fix |
A couple of other methods which seem to have test coverage only coincidentally, because they're called as part of a mostly-unrelated test that happens to call them:
State.Cloud CloudCredential s
State.