Skip to content

Commit

Permalink
Merge branch 'arch_23857/impact_of_api_change_for_tenants_on_plugins_pr'
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins CI committed Dec 9, 2023
2 parents a0f2a64 + 96ad07b commit 5ed06f1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ class RudderClientRegistrationRepository(val registrations: Map[String, RudderCl
}

final class RudderOidcDetails(oidc: OidcUser, rudder: RudderUserDetail)
extends RudderUserDetail(rudder.account, rudder.roles, rudder.apiAuthz) with OidcUser {
extends RudderUserDetail(rudder.account, rudder.roles, rudder.apiAuthz, rudder.nodePerms) with OidcUser {
override def getClaims: util.Map[String, AnyRef] = oidc.getClaims
override def getUserInfo: OidcUserInfo = oidc.getUserInfo
override def getIdToken: OidcIdToken = oidc.getIdToken
Expand All @@ -411,7 +411,7 @@ final class RudderOidcDetails(oidc: OidcUser, rudder: RudderUserDetail)
}

final class RudderOauth2Details(oauth2: OAuth2User, rudder: RudderUserDetail)
extends RudderUserDetail(rudder.account, rudder.roles, rudder.apiAuthz) with OAuth2User {
extends RudderUserDetail(rudder.account, rudder.roles, rudder.apiAuthz, rudder.nodePerms) with OAuth2User {
override def getAttributes: util.Map[String, AnyRef] = oauth2.getAttributes
override def getName: String = oauth2.getName
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,6 @@ class UpdateHttpDatasetTest extends Specification with BoxSpecMatcher with Logga
def getPendingNodeInfos() = throw new IllegalAccessException("Thou shall not used that method here")

override def getAllNodesIds(): IOResult[Set[NodeId]] = ???
override def getDeletedNodeInfo(nodeId: NodeId): IOResult[Option[NodeInfo]] = ???
override def getPendingNodeInfo(nodeId: NodeId): IOResult[Option[NodeInfo]] = ???

override def deleteNode(node: Node, modId: ModificationId, actor: EventActor, reason: Option[String]): IOResult[Node] = ???
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,15 @@ class MockServices(nodeInfos: Map[NodeId, NodeInfo], nodeGroups: Map[NodeGroupId
nodesRef.update(_ - node.id).map(_ => node)
}

override def getNodeInfos(nodeIds: Set[NodeId]): IOResult[Set[NodeInfo]] = ???
override def getNodeInfosSeq(nodeIds: Seq[NodeId]): IOResult[Seq[NodeInfo]] = ???
override def getNumberOfManagedNodes: Int = ???
override def getNumberOfManagedNodes: IOResult[Int] = ???
override def getAll(): IOResult[Map[NodeId, NodeInfo]] = ???
override def getAllNodesIds(): IOResult[Set[NodeId]] = ???
override def getAllNodes(): IOResult[Map[NodeId, Node]] = ???
override def getAllNodeInfos(): IOResult[Seq[NodeInfo]] = ???
override def getAllSystemNodeIds(): IOResult[Seq[NodeId]] = ???
override def getPendingNodeInfos(): IOResult[Map[NodeId, NodeInfo]] = ???
override def getPendingNodeInfo(nodeId: NodeId): IOResult[Option[NodeInfo]] = ???
override def getDeletedNodeInfos(): IOResult[Map[NodeId, NodeInfo]] = ???
override def getDeletedNodeInfo(nodeId: NodeId): IOResult[Option[NodeInfo]] = ???
override def updateNode(node: Node, modId: ModificationId, actor: EventActor, reason: Option[String]): IOResult[Node] =
???
override def updateNodeKeyInfo(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import com.normation.plugins.scaleoutrelay.ScaleOutRelayService
import com.normation.rudder.api.ApiVersion
import com.normation.rudder.rest.RestTestSetUp
import com.normation.rudder.rest.TraitTestApiFromYamlFiles
import com.normation.zio._
import java.nio.file.Files
import net.liftweb.common.Loggable
import org.junit.runner.RunWith
Expand All @@ -24,7 +25,7 @@ class ScaleOutRelayApiTest extends Specification with TraitTestApiFromYamlFiles
override def yamlSourceDirectory = "scaleoutrelay_api"
override def yamlDestTmpDirectory = tmpDir / "templates"

val mockServices = new MockServices(restTestSetUp.mockNodes.allNodesInfo, Map.empty)
val mockServices = new MockServices(restTestSetUp.mockNodes.nodeInfoService.getAll().runNow, Map.empty)
val modules = List(
new ScaleOutRelayApiImpl(
new ScaleOutRelayService(
Expand Down

0 comments on commit 5ed06f1

Please sign in to comment.