Iilun commented on code in PR #218: URL: https://github.com/apache/pekko-management/pull/218#discussion_r1589936546
########## lease-kubernetes/src/test/scala/org/apache/pekko/coordination/lease/kubernetes/NativeKubernetesApiSpec.scala: ########## @@ -0,0 +1,282 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.pekko.coordination.lease.kubernetes + +import com.github.tomakehurst.wiremock.WireMockServer +import com.github.tomakehurst.wiremock.client.WireMock +import com.github.tomakehurst.wiremock.client.WireMock._ +import com.github.tomakehurst.wiremock.core.WireMockConfiguration.wireMockConfig +import com.typesafe.config.ConfigFactory +import org.apache.pekko.Done Review Comment: I changed it, for the overall formatting of imports however I have a hard time finding a common formatting in the tests (differs between all 3 previous tests for this project), so I have just fixed the pekko style issue ########## lease-kubernetes/src/main/scala/org/apache/pekko/coordination/lease/kubernetes/internal/KubernetesJsonSupport.scala: ########## @@ -38,14 +38,32 @@ case class Metadata(name: String, resourceVersion: Option[String]) * INTERNAL API */ @InternalApi -case class Spec(owner: String, time: Long) +case class CustomSpec(owner: String, time: Long) + +/** + * INTERNAL API + */ +@InternalApi +case class NativeLeaseResource( + metadata: Metadata, + spec: NativeSpec, + kind: String = "Lease", + apiVersion: String = "coordination.k8s.io/v1") + +/** + * INTERNAL API + */ +@InternalApi +case class NativeSpec(holderIdentity: String, acquireTime: String) /** * INTERNAL API */ @InternalApi trait KubernetesJsonSupport extends SprayJsonSupport with DefaultJsonProtocol { implicit val metadataFormat: JsonFormat[Metadata] = jsonFormat2(Metadata.apply) - implicit val specFormat: JsonFormat[Spec] = jsonFormat2(Spec.apply) + implicit val customSpecFormat: JsonFormat[CustomSpec] = jsonFormat2(CustomSpec.apply) Review Comment: Reverted -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
