-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TEST]: Improvement: Switch: New interaction approach #5759
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice, but some improvements are needed.
...ional-tests/src/main/groovy/org/openkilda/functionaltests/helpers/factory/FlowFactory.groovy
Show resolved
Hide resolved
...tional-tests/src/main/groovy/org/openkilda/functionaltests/helpers/model/PortExtended.groovy
Outdated
Show resolved
Hide resolved
...tional-tests/src/main/groovy/org/openkilda/functionaltests/helpers/model/PortExtended.groovy
Show resolved
Hide resolved
...tional-tests/src/main/groovy/org/openkilda/functionaltests/helpers/model/PortExtended.groovy
Outdated
Show resolved
Hide resolved
...tional-tests/src/main/groovy/org/openkilda/functionaltests/helpers/model/PortExtended.groovy
Outdated
Show resolved
Hide resolved
...ctional-tests/src/main/groovy/org/openkilda/functionaltests/helpers/model/SwitchRules.groovy
Outdated
Show resolved
Hide resolved
...al-tests/src/test/groovy/org/openkilda/functionaltests/spec/switches/DefaultRulesSpec.groovy
Outdated
Show resolved
Hide resolved
...al-tests/src/test/groovy/org/openkilda/functionaltests/spec/switches/DefaultRulesSpec.groovy
Outdated
Show resolved
Hide resolved
...al-tests/src/test/groovy/org/openkilda/functionaltests/spec/switches/DefaultRulesSpec.groovy
Outdated
Show resolved
Hide resolved
...ctional-tests/src/test/groovy/org/openkilda/functionaltests/spec/switches/LagPortSpec.groovy
Outdated
Show resolved
Hide resolved
logicalPortNumber == lagPort | ||
name == "novi_lport" + lagPort.toString() | ||
portNumbers.sort() == portsArrayCreate.sort() | ||
type == LogicalPortType.LAG | ||
} | ||
|
||
and: "Switch is valid" | ||
!switchHelper.synchronizeAndCollectFixedDiscrepancies(sw.dpId).isPresent() | ||
!switchToInteract.validateAndCollectFoundDiscrepancies().isPresent() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replaced with the validation call as sync doesn't check lag/group(the same below)
country: initConf.location.country ?: "", | ||
street: initConf.location.street ?: "" | ||
]] as SwitchPatchDto)}) | ||
def response = northboundV2.partialSwitchUpdate(sw.dpId, updateRequest) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
partialUpdate method has a rollback to the initial config(cleanupManger action)
...nal-tests/src/main/groovy/org/openkilda/functionaltests/helpers/factory/SwitchFactory.groovy
Outdated
Show resolved
Hide resolved
5dc4fe8
to
8275508
Compare
def "Unable decrease bandwidth on LAG port lower than connected flows bandwidth sum"() { | ||
given: "Flows on a LAG port with switch ports" | ||
def switchPair = switchPairs.all().random() | ||
def testPorts = topology.getAllowedPortsForSwitch(switchPair.src).takeRight(2).sort() | ||
def switchPair = switchPairs.all().withoutWBSwitch().random() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flaky test: excluded WB switch due to the difference in ports speed
8275508
to
2ff4775
Compare
...ional-tests/src/main/groovy/org/openkilda/functionaltests/helpers/factory/FlowFactory.groovy
Show resolved
Hide resolved
c5758c8
to
a65ed7b
Compare
dfbaf49
to
cd9c42b
Compare
@@ -0,0 +1,33 @@ | |||
/* Copyright 2021 Telstra Open Source |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, update copyright
cd9c42b
to
ce481bb
Compare
In the scope of
Global refactoring: Replace helpers with business models
, new changes have been added. All interactions with a switch are available through the SwitchExtended business model. To not overload SwitchExtended by methods, it was decided to have separate modules for rules, meters, and lag interactions (reused existing entities SwitchRules and SwitchMeters).