In addition to getting a shot of lubrication for his right knee Tuesday, CC Sabathia recently underwent tests on his left shoulder.

“Just looking at stuff, he’s fine,’’ Aaron Boone said of Sabathia’s shoulder before Wednesday’s 7-5 win over the Diamondbacks at Yankee Stadium.

Talking about the 39-year-old pitcher’s knee that landed him on the injured list Sunday, Boone was upbeat, but admitted there is more information to absorb.

“We’re pretty optimistic it will be on the shorter side of things hopefully, but we’ll see how the next few days unfold,’’ Boone said. “Hopefully it’s something that is a couple-of-week thing. We’ll see here in the next couple of days.’’

In 17 starts, Sabathia is 5-6 with a 4.78 ERA. Until the past two starts Sabathia was on a four-game run of solid pitching. In those four games, the Yankees went 3-1 and Sabathia posted a 2-0 record with a 3.24 ERA. He gave up 20 hits in 25 innings, struck out 27, issued nine walks and held hitters to a .215 batting average and .664 OPS.

Nevertheless, in the last two starts in which Sabathia didn’t use the right hinge as an excuse, the Yankees and Sabathia were 0-2 and the other numbers were ugly. In eight innings, Sabathia gave up 15 hits, posted an 11.88 ERA, stuck out five, walked two, gave up six homers and hitters batted .385 with a 1.312 OPS.

DJ LeMahieu hasn’t played since last Friday night in Boston due to a groin problem, but expects to return Friday night against the Red Sox at Yankee Stadium when the blood rivals start a four-game in three days series.

“I feel pretty good. [Tuesday] I felt tremendously better and [Wednesday] I feel better,’’ said LeMahieu, who was tied with Red Sox third baseman Rafael Devers for the AL leading in hitting at .332 entering Wednesday’s action. “I’ve been hitting and doing everything normal.’’

With Luke Voit on the IL, playing at LeMahieu at first base with Gleyber Torres at second, Didi Gregorius at short and Gio Urshela at third gives the Yankees their best defensive infield.

“I’ve been tempted to put him in there [Tuesday night] and [Wednesday], but I feel like we have to play a little bit of a long game here, don’t want to risk injuring it further,’’ Boone said. “He’s doing well, but with these off days and obviously how important he is and this stretch we are about to enter [19 games in 17 days] I think it is to be smart about it as well.’’

Boone said getting Aaron Judge off his feet for an entire game had to do with more than the right fielder’s hitting slump Wednesday, when Judge was the Yankees’ DH.

“On the last road trip I really wanted to give him a day [off], probably in Minnesota, but with [Brett Gardner] going down we didn’t have a day to give to an outfielder,’’ Boone said. “In this long stretch of games, a lot of long games, high scoring, kind of grind-it-out days. Just sort of ways, not that DH is an off day, just a day to get him off his feet going into an off day.’’

Beginning with his final at-bat on July 24 in Minnesota, Judge entered Wednesday’s game in a 1-for-23 (.043) slump. He went 1-for-4 with three strikeouts.